Skip to content

Commit 34d1f67

Browse files
committed
accounts: update the service's UpdateAccount method
... to take a more strict btcutil.Amount type for the account balance parameter.
1 parent 0580d9a commit 34d1f67

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

accounts/rpcserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ func (s *RPCServer) UpdateAccount(ctx context.Context,
122122

123123
// Ask the service to update the account.
124124
account, err := s.service.UpdateAccount(
125-
ctx, accountID, req.AccountBalance, req.ExpirationDate,
125+
ctx, accountID, btcutil.Amount(req.AccountBalance),
126+
req.ExpirationDate,
126127
)
127128
if err != nil {
128129
return nil, err

accounts/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"sync"
88
"time"
99

10+
"github.com/btcsuite/btcd/btcutil"
1011
"github.com/btcsuite/btcd/chaincfg"
1112
"github.com/lightninglabs/lndclient"
1213
"github.com/lightningnetwork/lnd/channeldb"
@@ -299,7 +300,7 @@ func (s *InterceptorService) NewAccount(ctx context.Context,
299300
// UpdateAccount writes an account to the database, overwriting the existing one
300301
// if it exists.
301302
func (s *InterceptorService) UpdateAccount(ctx context.Context,
302-
accountID AccountID, accountBalance,
303+
accountID AccountID, accountBalance btcutil.Amount,
303304
expirationDate int64) (*OffChainBalanceAccount, error) {
304305

305306
s.Lock()

0 commit comments

Comments
 (0)