bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.81k stars 2.08k forks source link

[CWC] Handle numbers given in scientific notation form #3592

Closed escottalexander closed 9 months ago

escottalexander commented 1 year ago

The crux of the issue is that very large numbers are returned from mongo with scientific notation (ie 1.1573971113625423e+25). The Web3.utils.toBN method does not know what to do with scientific notation when given as a number or even as a string. The solution is to parse all numbers as a BigInt but then return the number as a string (which toBN is ready to handle).

Once this is is merged we need to publish and update BitPay and the Wallet with the new changes. Will need to get the new version of BWS and BWC as well as CWC.

leolambo commented 1 year ago

wait to merge

leolambo commented 11 months ago

good to go