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.
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.