From 2158c410289d013a41811ec91e139696c812e538 Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Mon, 22 Aug 2022 11:42:47 -0700 Subject: [PATCH] multi-scope: update getunconfirmedbalance --- rpc/legacyrpc/methods.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rpc/legacyrpc/methods.go b/rpc/legacyrpc/methods.go index fdad179eb2..37e5502961 100644 --- a/rpc/legacyrpc/methods.go +++ b/rpc/legacyrpc/methods.go @@ -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