zashi-android
zashi-android copied to clipboard
Consistent representation of Zatoshi amounts in UI
Is your feature request related to a problem? Please describe.
We'd like to update the wallet ZEC representation according to the rules below.
Describe the solution you'd like
Expanded amounts look like this: “1.12345678”
Or like this: “1.12345”
(I.e., omit trailing least-significant 0 digits.)
Abbreviated amounts look like this:
If the most significant digits are non-zero then “1.123”, regardless of whether the least-significant digits are zero or not.
If the most significant digits are zero but the least significant ones are non-zero then “0.000…”
If all the digits are zero then “0.000”.
Interactable amounts (such as the transaction amounts shown in the transaction row on the home screen) are shown abbreviated.
Non-interactable amounts are shown expanded.
For fees, specifically, they always say “(Fee < 0.001)”. (Fees are always < 0.001 ZEC.)
The rules are already implemented on the iOS side: https://github.com/Electric-Coin-Company/zashi-ios/pull/921/files#diff-b9a6370acdd507de92ab4346561978d98be6b09200034bd66faf1f39c5908988