From 6d60fe487e3ac58753d2bad8241c7e3d22c24123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Thu, 13 May 2021 15:12:24 +0100 Subject: [PATCH] fix: big number subtraction --- lib/plugins/wallet/geth/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/wallet/geth/base.js b/lib/plugins/wallet/geth/base.js index dc89a08a..d01ff49a 100644 --- a/lib/plugins/wallet/geth/base.js +++ b/lib/plugins/wallet/geth/base.js @@ -78,7 +78,7 @@ function balance (account, cryptoCode, settings, operatorId) { const pendingBalance = (address, cryptoCode) => { const promises = [_balance(true, address, cryptoCode), _balance(false, address, cryptoCode)] - return Promise.all(promises).then(([pending, confirmed]) => pending - confirmed) + return Promise.all(promises).then(([pending, confirmed]) => pending.minus(confirmed)) } const confirmedBalance = (address, cryptoCode) => _balance(false, address, cryptoCode)