mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
multi-account: update getunconfirmedbalance
This commit is contained in:
parent
09ec547ed6
commit
03dd33f8c9
1 changed files with 2 additions and 5 deletions
|
@ -730,14 +730,11 @@ func getAccountAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error)
|
||||||
func getUnconfirmedBalance(icmd interface{}, w *wallet.Wallet) (interface{}, error) {
|
func getUnconfirmedBalance(icmd interface{}, w *wallet.Wallet) (interface{}, error) {
|
||||||
cmd := icmd.(*btcjson.GetUnconfirmedBalanceCmd)
|
cmd := icmd.(*btcjson.GetUnconfirmedBalanceCmd)
|
||||||
|
|
||||||
acctName := defaultAccountName
|
account, err := w.AccountNumber(*cmd.Account)
|
||||||
if cmd.Account != nil {
|
|
||||||
acctName = *cmd.Account
|
|
||||||
}
|
|
||||||
account, err := w.AccountNumber(waddrmgr.KeyScopeBIP0044, acctName)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
bals, err := w.CalculateAccountBalances(account, 1)
|
bals, err := w.CalculateAccountBalances(account, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue