Closed jonbern closed 5 years ago
This is a very good point. @jonbern
I agree we should not round up the small numbers to zero, as this could be confusing for the users.
Currently, the numbers are round up by max 6 decimal places. I have updated the related component, NumericText
to support a dynamic parameter for max decimal places.
For the transaction data and the views of transfer/deposit/withdraw, I configure the numbers with max 18 decimal places. If the numbers smaller than 18 decimal places, they will be displayed in a format of 1.000e-19.
For the wallet cards in the dashboard, where has limited UI spaces, the numbers are configured with max 6 decimal places. So when the numbers are smaller than 6 decimal places, they will be displayed as 1.000e-7 to indicate it is a non-zero value while saving up the UI spaces.
Here are the examples of how the numbers are being formated in different settings: https://github.com/hubiinetwork/hubii-core/pull/760/files#diff-535748a6017ef897c96f0d69e4b174b9R43
Feel free to let me if any comments.
Transaction history of very small amounts are shown as 0 when they are sufficiently small, but greater than 0.
We need to find a way to display these values in a reasonable way, but without showing too many decimals when not necessary.