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

Fixed small numbers parsing #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

slavafomin
Copy link

@slavafomin slavafomin commented Jun 2, 2022

This PR fixes the issue #6.

Released as: @ton.js/[email protected] for testing and a as quick fix.

Signed-off-by: Slava Fomin II <[email protected]>
@slavafomin slavafomin changed the title Added failed toWei() test for small numbers Fixed small numbers parsing Jun 2, 2022
@slavafomin slavafomin marked this pull request as draft June 2, 2022 14:53
@slavafomin slavafomin marked this pull request as ready for review June 2, 2022 15:13
@slavafomin slavafomin marked this pull request as draft June 2, 2022 15:42
@slavafomin
Copy link
Author

Solution is pending. Current implementation has some flaws.

@slavafomin
Copy link
Author

I've updated number parsing to use Intl for more reliable results, both toString and toFixed give incorrect results for some numbers.

@slavafomin slavafomin marked this pull request as ready for review June 2, 2022 16:28
@slavafomin
Copy link
Author

Published as @ton.js/[email protected] for testing and as a hotfix.

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

Successfully merging this pull request may close these issues.

1 participant