Closed santteegt closed 3 years ago
CLA Assistant Lite All Contributors have signed the CLA.
I have read the CLA Document and I hereby sign the CLA
Hello @santteegt, I had issues adding commits to this PR. I copied your commit and created this new one: https://github.com/gnosis/contract-proxy-kit/pull/152
I'm keeping the new BigNumber()
even if a BigNumber is already returned, because the CPK is using the library https://github.com/MikeMcl/bignumber.js/, (supported on Web3Adapter
and EthersAdapter
) and the BigNumber returned from signer.provider.getBalance
is not using that library, where some things are different (methods like .add()
vs .plus()
, etc.
I fixed the NaN
issue and added some tests.
Thank you for this PR. Good catch!
This PR fixes a NaN error when calling
CPK.getBalance()
using EthersJS (EthersAdapter) providerReason: the
signer.provider.getBalance
method already returns a BigNumber