status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.88k stars 984 forks source link

Wallet: crypto decimal places #18225

Open OmarBasem opened 9 months ago

OmarBasem commented 9 months ago

3 points to consider to display crypto decimal places correctly:

  1. Minimal number of decimal places: there should never be zeros at the end of decimal places e.g. “2.4 ETH” is correct and “2.40 ETH is incorrect.

  2. Maximum number of decimal places should be defined as the number of decimal places needed so that a “1” in the final decimal place always has a value of between $0.01 and $0.10 USD (another issue https://github.com/status-im/status-mobile/issues/18244): e.g. when ETH is priced at $365 four decimal places should be used for ETH because 0.0001 ETH = $0.036 USD which is between $0.01 and $0.10 USD. When ETH rises to $1,000 USD, the UI should change to displaying ETH to five digits. To give another example when 1 SNT is worth $0.024860 USD, no decimal places should be used when displaying sums in SNT because 1 SNT = $0.024 which is between $0.01 and $0.10 USD.

  3. Reduce digits shown for very large currency amounts (another issue https://github.com/status-im/status-mobile/issues/18226): By default, always show up to single-digit billions. If there's not enough space, remove decimal places. If there's still not enough space, use some shorter format (k's, M's, B's)

Fiat decimal places in another issue: https://github.com/status-im/status-mobile/issues/18227

Original discussion: https://github.com/status-im/status-desktop/issues/8640

J-Son89 commented 7 months ago

@OmarBasem - still relevant?

OmarBasem commented 7 months ago

@J-Son89 yes still relevant. Issue number 3 is not fixed. And as for issue number 2 we need to get the decimal count from status-go