fix: convert bn.js to bignumber.js bignum

This commit is contained in:
André Sá 2022-02-03 19:52:26 +00:00
parent 2da14d64b3
commit 71266401f0

View file

@ -93,6 +93,8 @@ function _balance (includePending, address, cryptoCode) {
} }
const block = includePending ? 'pending' : undefined const block = includePending ? 'pending' : undefined
return pify(web3.eth.getBalance)(address.toLowerCase(), block) return pify(web3.eth.getBalance)(address.toLowerCase(), block)
/* NOTE: Convert bn.js bignum to bignumber.js bignum */
.then(balance => balance ? BN(balance.toString(16), 16) : BN(0))
} }
function generateTx (_toAddress, wallet, amount, includesFee, cryptoCode) { function generateTx (_toAddress, wallet, amount, includesFee, cryptoCode) {