Skip to content
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

Explorer does not properly represent large token amounts #197

Open
SethDusek opened this issue Jan 1, 2024 · 0 comments
Open

Explorer does not properly represent large token amounts #197

SethDusek opened this issue Jan 1, 2024 · 0 comments

Comments

@SethDusek
Copy link

Hi, this issue is similar to ergoplatform/ergo#1900 where the frontend does not represent large numbers properly due to JavaScript's number type not being large enough.

The following testnet address displays this issue: https://testnet.ergoplatform.com/en/addresses/3WwkxVkCiN5PKa4CLg72aX2XR53QfGRZmfJxEgiQEqsMmi59ULwq

image

Note that both of these tokens have a supply of 9223372036854775807 but they're both shown incorrectly here. The JSON endpoint for address balances correctly shows the actual amount https://api-testnet.ergoplatform.com/api/v1/addresses/3WwkxVkCiN5PKa4CLg72aX2XR53QfGRZmfJxEgiQEqsMmi59ULwq/balance/confirmed but using JSON.parse corrupts them.

Also, one of these tokens has 0 decimals and the other has 1, causing further precision issues when the frontend divides the number by the number of decimal points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant