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

[Wallet] <BigNumber>.toString() almost never return exponential notation #6212

Merged
merged 3 commits into from
Dec 14, 2020

Conversation

i1skn
Copy link
Contributor

@i1skn i1skn commented Dec 11, 2020

Description

There is quite a few usages of <BigNumber>.toString() around the codebase, which potentially can return exponential notation, which AFAIK not needed anywhere in the app. This change would make <BigNumber>.toString() almost identical to <BigNumber>.toFixed(), which always returns fixed notation.

For reference: https://mikemcl.github.io/bignumber.js/#exponential-at

Also, removed unused param in createStandbyTx function.

Related issues

Backwards compatibility

Yes

Copy link
Contributor

@annakaz annakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@i1skn i1skn added the automerge Have PR merge automatically when checks pass label Dec 14, 2020
Copy link
Contributor

@jeanregisser jeanregisser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 👍
Should we add a small unit test to make sure we don't inadvertently revert this in the future?

@mergify mergify bot merged commit 0c86f76 into master Dec 14, 2020
@mergify mergify bot deleted the i1skn/fix-bn-to-string branch December 14, 2020 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exchange amounts should not be represented in scientific notation
3 participants