fix: move ETH pending balance fix to wallet

This commit is contained in:
Sérgio Salgado 2021-02-15 13:30:59 +00:00 committed by Josh Harvey
parent 9a074438bd
commit caf2c83bfb
2 changed files with 5 additions and 4 deletions

View file

@ -71,7 +71,10 @@ function balance (account, cryptoCode) {
.then(() => pendingBalance(defaultAddress(account)))
}
const pendingBalance = address => _balance(true, address)
const pendingBalance = address => {
const promises = [_balance(true, address), _balance(false, address)]
return Promise.all(promises).then(([pending, confirmed]) => pending - confirmed)
}
const confirmedBalance = address => _balance(false, address)
function _balance (includePending, address) {