fix: bitgo pending and confirmed balances

This commit is contained in:
Sérgio Salgado 2022-05-26 18:36:03 +01:00
parent 67e21d202f
commit 2a038ebd9f

View file

@ -143,8 +143,8 @@ function newFunding (account, cryptoCode, settings, operatorId) {
const fundingAddress = result.address const fundingAddress = result.address
return wallet.updateAddress({ address: fundingAddress, label: 'Funding Address' }) return wallet.updateAddress({ address: fundingAddress, label: 'Funding Address' })
.then(() => ({ .then(() => ({
fundingPendingBalance: new BN(wallet._wallet.balanceString), fundingPendingBalance: new BN(wallet._wallet.balance).minus(wallet._wallet.confirmedBalance),
fundingConfirmedBalance: new BN(wallet._wallet.confirmedBalanceString), fundingConfirmedBalance: new BN(wallet._wallet.confirmedBalance),
fundingAddress: getCashAddress(fundingAddress, cryptoCode) fundingAddress: getCashAddress(fundingAddress, cryptoCode)
})) }))
}) })