-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow up to 6 decimals in transfer values #152
Conversation
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.
LGTM with some comments! Thanks!
__tests__/ain.test.ts
Outdated
expect(Wallet.countDecimals(100001)).toBe(0); | ||
expect(Wallet.countDecimals(1000001)).toBe(0); | ||
expect(Wallet.countDecimals(10000001)).toBe(0); | ||
expect(Wallet.countDecimals(100000001)).toBe(0); |
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.
Q. What does these test cases mean? (11, 101, ..., 100000001)
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.
This is '1.00000001e8' case.
__tests__/ain.test.ts
Outdated
expect(Wallet.countDecimals(1.0000003)).toBe(7); | ||
expect(Wallet.countDecimals(1.00000003)).toBe(8); | ||
expect(Wallet.countDecimals(1.000000003)).toBe(9); | ||
expect(Wallet.countDecimals(1.0000000003)).toBe(10); |
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.
minor) How about adding test cases in the 'e-' format?
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.
0.0000000012 is actually '1.2e-9' case. toString() converts 0.0000000012 to '1.2e-9'.
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.
Just added toString() results as comments. Thanks!
Thanks for the review! @jiyoung-an Now merging.. |
Change summary:
Related issues: