lnrpc: add MinConfs to WalletBalanceRequest
This commit is contained in:
4 files changed
+1704
-1676
No files matched your search
+4
-1
@@ -3292,8 +3292,11 @@ func (r *rpcServer) WalletBalance(ctx context.Context,
|
||||
// Get confirmed balance, from txs that have >= 1 confirmations.
|
||||
// TODO(halseth): get both unconfirmed and confirmed balance in
|
||||
// one call, as this is racy.
|
||||
if in.MinConfs <= 0 {
|
||||
in.MinConfs = 1
|
||||
}
|
||||
confirmedBal, err := r.server.cc.Wallet.ConfirmedBalance(
|
||||
1, account.AccountName,
|
||||
in.MinConfs, account.AccountName,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user