-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Utils functions mention BigNumber instead of BN in error messages #2468
Comments
Yes, the documentation is wrong it's currently returning the BigNumber object but was always named BN. I will update the documentation and the related function documentation blocks. |
It's also the thrown error messages (not sure if you are counting this in "documentation"). |
Since there is an |
@rhlsthrm @interfect I can't really answer that because I do not the thoughts the former maintainer had. The whole BigNumber handling here in Web3.js will get improved asap. |
@nivida are you going to use |
Description
Error messages for utils functions
toWei
,fromWei
, etc. throw the following error:The source itself checks if they are BN, not BigNumber. Relevant source (others in this file as well): https://github.com/ethereum/web3.js/blob/1.0/packages/web3-utils/src/index.js#L193
Steps to reproduce the behavior
web3
web3.utils.toWei(5)
(i.e. pass in a number or other non-allowed type).Error Logs
Gists
Versions
The text was updated successfully, but these errors were encountered: