-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
FixedNumber with zero decimal causes error #1463
Labels
bug
Verified to be an issue.
fixed/complete
This Bug is fixed or Enhancement is complete and published.
minor-bump
Planned for the next minor version bump.
Comments
ricmoo
added a commit
that referenced
this issue
May 14, 2021
This has been fixed in 5.2.0. Try it out and let me know if there are still any issues. Thanks! :) |
# node
Welcome to Node.js v14.16.1.
Type ".help" for more information.
> const { BigNumber, FixedNumber } = require('@ethersproject/bignumber')
undefined
> FixedNumber.fromValue(BigNumber.from('0'), 0).toFormat('fixed128x0');
FixedNumber {
format: FixedFormat {
signed: true,
width: 128,
decimals: 0,
name: 'fixed128x0',
_multiplier: '1'
},
_hex: '0x00',
_value: '0',
_isFixedNumber: true
} 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Verified to be an issue.
fixed/complete
This Bug is fixed or Enhancement is complete and published.
minor-bump
Planned for the next minor version bump.
Problems
Following code causes error.
the error is
following is OK
but there is some doubt that _value is "0.0". this may be the cause of the error.
Version
the error can be reproduced on
@ethersproject/bignumber:5.1.0
.and I use node v14.16.1.
The text was updated successfully, but these errors were encountered: