hwki / SimpleBitcoinWidget

Clean looking, simple cryptocurrency widget for Android.
MIT License
106 stars 47 forks source link

Please add "PAN" to "BITPANDA" #129

Closed avl42 closed 9 months ago

avl42 commented 9 months ago

please add "PAN" ("Pantos") to the list of currencies found on "BITPANDA".

I think this would affect file "bitcoin/src/main/res/raw/cryptowidgetcoins_v2.json"

Another suggestion would be replacing this file by a pretty-printed version of it, and only condense it as it is being packaged into the apk. That would make it much easier to follow its changes on github, than with all-in-a-line as it is now.

avl42 commented 9 months ago

I'm in progress of preparing a "semi-expanded" version of that file, that is still much more compact than a completely expanded version of it, but will already allow to see added coins as simple added lines.

When finished, I'll make a PR for that file (first without the "PAN" change) and then, based on that, a second change for "PAN".

Filesize is currently 155kb, fully expanded would be 413kb, and I vaguely expect my changes to end up at about 200k. Would this be acceptable? If not, I'd try to shrink it some more.

hwki commented 9 months ago

The formatting of that file isn't important as it is autogenerated by GenerateSupportCoinsJson.kt. It is not designed to be manually edited or viewed.

The reason that Pantos is only available with CoinGecko is because it is not one of the coins that has full support (See Coin.kt). As there are tens of thousands of coins out there, I have only added full support to the most popular ones, or ones that have been specifically requested. The rest are dynamically loaded from the CoinGecko API. So attempting to add PAN to the json file manually still won't work for enabling it for Bitpanda.

I can instead add Pantos as a fully supported coin, which will allow you to select Bitpanda. I should be able to get around to that today.

avl42 commented 9 months ago

Oh! Thanks for the info - I didn't notice that.

Yes, please add "PAN" - as it is mostly traded on BITPANDA (a broker), so coingecko has no access to the relevant order books, and so coingecko's price for PAN is often ways off.

hwki commented 9 months ago

Added in https://github.com/hwki/SimpleBitcoinWidget/commit/4c5679fd470ee14e98c1d1e7725e2777aff575c1