diff --git a/lib/plugins/wallet/monerod/monerod.js b/lib/plugins/wallet/monerod/monerod.js index 37d46a77..3b85088c 100644 --- a/lib/plugins/wallet/monerod/monerod.js +++ b/lib/plugins/wallet/monerod/monerod.js @@ -92,7 +92,7 @@ function accountBalance (cryptoCode) { .then(() => refreshWallet()) .then(() => fetch('get_balance', { account_index: 0, address_indices: [0] })) .then(res => { - return BN(res.unlocked_balance).shift(unitScale).round() + return BN(res.unlocked_balance).shiftedBy(unitScale).decimalPlaces(0) }) .catch(err => handleError(err)) } @@ -177,7 +177,7 @@ function newFunding (account, cryptoCode) { fetch('create_address', { account_index: 0 }) ])) .then(([balanceRes, addressRes]) => ({ - fundingPendingBalance: BN(balanceRes.balance).sub(balanceRes.unlocked_balance), + fundingPendingBalance: BN(balanceRes.balance).minus(balanceRes.unlocked_balance), fundingConfirmedBalance: BN(balanceRes.unlocked_balance), fundingAddress: addressRes.address }))