-
-
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
Rounding negative FixedNumbers which are not using the default format results in an incompatible format
error
#1749
Comments
The bug is in the It is fixed locally and will be going out in the next release. Thanks! :) |
This has been fixed in 5.4.2. Let me know if you still have any issues with it. |
@ricmoo Awesome, thanks a bunch! Will give it a shot soonish and will let you know. |
Closing this now. If you find it is still an issue, please re-open. Thanks! :) |
Hi, just go around to testing this out today. I haven't found any issues, had a test suite to run against, which was using a workaround for rounding negative numbers. After updating ethers to 5.4.2 and removing the workaround everything was green. So yeah, this one is good! :) Thanks again for your quick help with this! |
Hi, I think there's still a small bug in
FixedNumber.round()
, when working with negative numbers...Describe the bug
Rounding negative FixedNumbers which are not in the default format results in an
incompatible format
error.Reproduction steps
FixedNumber.from('-0.01101100205516751', 'fixed128x17').round(2)
Error produced
Environment
browser
Notes
When removing the minus sign from the number, no error is thrown.
Originally posted by @alexanderwende in #1629 (comment)
The text was updated successfully, but these errors were encountered: