-
-
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.round() throws incompatible format
on non-default formats
#1629
Comments
Thanks! That looks like a bug on my side. I’ll look into this shortly. |
This should be fixed in 5.3.0. Try it out and let me know if you still have any issues. Thanks! :) |
Hi, I think there's still a small bug in there, when working with negative numbers... Describe the bug Rounding negative numbers which are not of the default format results in an incompatible format error. Reproduction steps
Error produced
Environment browser Notes When removing the minus sign from the number, no error is thrown. |
The hacks are no longer necessary as the fix has been merged upstream: ethers-io/ethers.js#1629
Describe the bug
Rounding numbers which are not of the default format results in an
incompatible format
error.Reproduction steps
FixedNumber.fromValue(1, 27, "fixed256x27").round()
Error produced:
Environment:
Browser JS context.
Search Terms
FixedNumber
,round
,rounding
The text was updated successfully, but these errors were encountered: