Irys-xyz / arweave-js-sdk

JS SDK for Irys on Arweave
110 stars 95 forks source link

fix the big integer raising issue when doing fund action #6

Closed jorahw3 closed 2 years ago

jorahw3 commented 2 years ago

Currently when doing the fund action on ploygon it will raise issue when the number is big than 9007199254740991(2**53 -1), it is because ethers.utils.hexlify function will check the number and if this is not a safe js integer, it will raise the issue.

However since the decimal of MATIC is 18, it will really easy the number is bigger than 2 **53. This PR is to fix the issue by using the bignumber instead of javascript number.