From 34d1f67dd0b690199d7386a608511fb7b665878e Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Fri, 17 Jan 2025 08:37:20 +0200 Subject: [PATCH] accounts: update the service's UpdateAccount method ... to take a more strict btcutil.Amount type for the account balance parameter. --- accounts/rpcserver.go | 3 ++- accounts/service.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/accounts/rpcserver.go b/accounts/rpcserver.go index 5c1314820..79e3e674b 100644 --- a/accounts/rpcserver.go +++ b/accounts/rpcserver.go @@ -122,7 +122,8 @@ func (s *RPCServer) UpdateAccount(ctx context.Context, // Ask the service to update the account. account, err := s.service.UpdateAccount( - ctx, accountID, req.AccountBalance, req.ExpirationDate, + ctx, accountID, btcutil.Amount(req.AccountBalance), + req.ExpirationDate, ) if err != nil { return nil, err diff --git a/accounts/service.go b/accounts/service.go index 6ef861ecd..9db0e4395 100644 --- a/accounts/service.go +++ b/accounts/service.go @@ -7,6 +7,7 @@ import ( "sync" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/channeldb" @@ -299,7 +300,7 @@ func (s *InterceptorService) NewAccount(ctx context.Context, // UpdateAccount writes an account to the database, overwriting the existing one // if it exists. func (s *InterceptorService) UpdateAccount(ctx context.Context, - accountID AccountID, accountBalance, + accountID AccountID, accountBalance btcutil.Amount, expirationDate int64) (*OffChainBalanceAccount, error) { s.Lock()