From 71266401f09283c25cb2ae1ff3655a9e5522f471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Thu, 3 Feb 2022 19:52:26 +0000 Subject: [PATCH] fix: convert bn.js to bignumber.js bignum --- lib/plugins/wallet/geth/base.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/wallet/geth/base.js b/lib/plugins/wallet/geth/base.js index 64b890c1..c6c10ca9 100644 --- a/lib/plugins/wallet/geth/base.js +++ b/lib/plugins/wallet/geth/base.js @@ -93,6 +93,8 @@ function _balance (includePending, address, cryptoCode) { } const block = includePending ? 'pending' : undefined 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) {