Merge pull request #1244 from chaotixkilla/fix-bitgo-pending-confirmed-balances

Fix BitGo pending and confirmed balances on funding page
This commit is contained in:
Rafael Taranto 2022-05-27 16:04:08 +01:00 committed by GitHub
commit 0b3f566806

View file

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