parseFloat makes quantities / referenced amounts confusing to end users and integrators
See original GitHub issueDescribe the bug The use of parseFloat in the explorer is confusing to integrators and end users because it gives an incorrect perception of the amount being transferred, and the balance of holdings.
Reference # 1, e.g. balance of USDA is not $330,891,881.00:
Link to explorer: https://explorer.stacks.co/address/SPWVN0HJ5RJJWXPAP5JFNZ9Q0V68TVSS1WSG45X6?chain=mainnet
Reference # 2, e.g. this is not a transfer of $11B USD
Link to explorer: https://explorer.stacks.co/txid/0x8e8773bf0693a9ba7543eb2bef58634e91d8fc49cc0c2a5132c391843cf7acc6?chain=mainnet
Expected behavior
Explorer should take decimals into account for token (get-decimals
).
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Tokens are displayed with decimals · Issue #402
wbnns mentioned this issue on Dec 17, 2021. parseFloat makes quantities / referenced amounts confusing to end users and integrators #604.
Read more >parseFloat() - JavaScript - MDN Web Docs
The parseFloat() function parses a string argument and returns a floating point number.
Read more >The difference between number (), parseint (), and ...
A: Number ()If it is a Boolean value, the true and false values are converted to 1 and 0, respectively.If it is a...
Read more >Javascript parse float is ignoring the decimals after my ...
This is assuming that the amount from the existing database is 3,000.78. The results are: 3000.78 without the initial comma (,) .
Read more >parseFloat vs Number: What's the Difference? - Cam McHenry
Picking a function to use for parsing numbers can be a confusing question to answer, ... parseFloat: Stops When Input Stops Making Sense....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hoping to release this to production today! 🙌
@fbwoolf Thanks!