KomodoPlatform / komodo-wallet-desktop

Komodo Wallet Desktop GUI
https://komodoplatform.com/en/wallet/
GNU General Public License v2.0
238 stars 206 forks source link

[BUG]: Price input allows insane values #2127

Open smk762 opened 1 year ago

smk762 commented 1 year ago

To replicate:

https://user-images.githubusercontent.com/35845239/204307814-aef38b8d-08d8-4d87-bd29-5b26a301eb94.mp4

ghost commented 1 year ago

We should take a decision on how many decimals we use for the whole application so numbers are more coherent and users will be less likely to do errors

Still I don't know what's the best amount of decimals, please let's discuss here

cc. @smk762 @tonymorony @cipig

smk762 commented 1 year ago

widest range I guess would be trying to trade "x" BTC for "y" of the lowest value priced memecoin. https://www.coingecko.com/en/coins/baby-doge-coin at $0.000000001139 USD is a likely candidate. So at current btc price, thats ₿0.000000000000070360 Then add a few extra zeros in anticipation of the imminent million dollars USD per bitcoin price.

tonymorony commented 1 year ago

cf: https://github.com/KomodoPlatform/atomicDEX-API/issues/922

and: https://github.com/KomodoPlatform/atomicDEX-Desktop/issues/955

cipig commented 1 year ago

We should take a decision on how many decimals we use for the whole application so numbers are more coherent and users will be less likely to do errors

Still I don't know what's the best amount of decimals, please let's discuss here

cc. @smk762 @tonymorony @cipig

this are the lowest prices for the coins i do marketmaking in BTC (just theoretically, since i don't post those orders, just show them in my output): XEC, price: 1.78425773559708e-09 BTCZ, price: 9.54207176396639e-09 SHIB-BEP20, price: 5.60818349709953e-10 AVN, price: 2.76781608348061e-09 BIDR-BEP20, price: 3.85302849025611e-09 BTTC-BEP20, price: 4.27700492502788e-11 XMY, price: 9.33210944830757e-09

so BTTC (https://www.coingecko.com/en/coins/bittorrent) is the one with lowest price and would need 12 decimals would be nice if ADEX would be able to handle more then 8 decimals, like 12 or so... but it would need lots of tweaking, orderbooks would need to be wider to be able to show 12 decimals correctly and lots of other views would need to be changed... problem is also that most coins are fine with 8 decimals (especially on pairs other then BTC) and showing 12 decimals for those would make lots of views overloaded... there is also the opposite problem, high prices like this on ETH/BIDR (here it would be nice to not show any decimals at all for price, or only 2): image so i think we would need some sort of dynamic number of decimals