-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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: