fix: get subaddress unlocked balance
This commit is contained in:
parent
7c5cc3ff21
commit
63b0f01409
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ function newAddress (account, info, tx, settings, operatorId) {
|
|||
function addressBalance (address, confirmations) {
|
||||
return fetch('get_address_index', { address: address })
|
||||
.then(addressRes => fetch('get_balance', { account_index: addressRes.index.major, address_indices: [addressRes.index.minor] }))
|
||||
.then(res => BN(res.unlocked_balance))
|
||||
.then(res => BN(_.find(it => it.address === address, res.per_subaddress).unlocked_balance))
|
||||
.catch(err => handleError(err))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue