Skip to content

Commit

Permalink
multi-scope: update getunconfirmedbalance
Browse files Browse the repository at this point in the history
  • Loading branch information
roylee17 committed Sep 26, 2022
1 parent 028f4a7 commit 2158c41
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rpc/legacyrpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,14 +730,11 @@ func getAccountAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error)
func getUnconfirmedBalance(icmd interface{}, w *wallet.Wallet) (interface{}, error) {
cmd := icmd.(*btcjson.GetUnconfirmedBalanceCmd)

acctName := defaultAccountName
if cmd.Account != nil {
acctName = *cmd.Account
}
account, err := w.AccountNumber(waddrmgr.KeyScopeBIP0044, acctName)
account, err := w.AccountNumber(*cmd.Account)
if err != nil {
return nil, err
}

bals, err := w.CalculateAccountBalances(account, 1)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2158c41

Please sign in to comment.