web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Update BN.js dependecy to v5.2.1

Open gregorfelkar opened this issue 4 years ago • 2 comments

This is not a Bug Report, Feature Request, or related to Documentation

  • [X] I have searched the existing issues

Is there an existing issue for this?

  • [X] I have searched the existing issues

What's up?

  • Fix serious issue in .toString(16)

The hex encoding of some numbers is wrong. Since the string representation is also used for interoperability between BigInt libraries, this bug is causing a number modification when a BN.js number is converted into another BigInt class, for example the BigNumber of ethers.js.

https://github.com/indutny/bn.js/commit/042ab62e70418c15f189b45460709a51faf303cc

Currently it will install:

│ └─┬ [email protected]
│   ├── [email protected]

Examples/References

No response

gregorfelkar avatar May 25 '22 10:05 gregorfelkar

Hey I am new to the repo, will this be a good first issue? If yes I would like to pick this up.

plusminushalf avatar May 25 '22 13:05 plusminushalf

Thank you for this @gregorfelkar this looks serious and we'll update BN as soon as we can

luu-alex avatar May 25 '22 13:05 luu-alex