-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: format units according to asset decimals + unknown asset #115
Conversation
Coverage report
Test suite run success0 tests passing in 0 suite. Report generated by 🧪jest coverage report action from 1170dbf |
FE-31 Unknown assets should have units 0 by default
When working with custom assets that we don't have the metadata, is not a good thing to format by default with 9 decimals, to avoid this let's fix default units for unknown assets to 0. This should affect all places that have asset balance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amount format is great, but it should not have any decimal... as a decimal .0
for integer means one more 0 that don't exist.
Account example: https://fuel-explorer-j0r8fpcif-fuel-labs.vercel.app/account/fuel18e7amfxs60urq7h97xhdsa3rnykpcn0valkxsjfkjcrh2xqmyvpq4ay9jn It should be showing 1,052,399,877
only.
Closes FE-31
this PR address fully the format of amounts being showed across the explorer. will format to assets decimal config OR format the raw amount if it’s a unknown asset (unknown asset decimals)
fuels/assets@0.1.3
to get new asset utils functions