-
Notifications
You must be signed in to change notification settings - Fork 153
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
BN parses invalid characters #151
Comments
Yeah, I just ran into this, took a long time to debug, because I assumed hex-prefixed base 16 would be digested gracefully.
Hex prefixes should be removed automatically, and otherwise invalid characters should throw a descriptive error. |
Our gas price buffering logic had a bug, because bn.js has inconsistent behavior when using hex-prefixed output. The issue has been opened with them here: indutny/bn.js#151 We've corrected our usage in the mean time.
related with #141 |
If it throws an error for the hex prefix, I'd consider that mostly solving the issue. Wouldn't the |
@FlySwatter I already checked and looks like that PR don't throw error |
Just ran in to this again omg fml |
@kumavis wrap the BN constructor in something that is stricter so as to avoid this issue. |
bn = new BN('xxx', 16)
<BN: 888>
The text was updated successfully, but these errors were encountered: