From 2ce98c1c3d9c41a404c03a5999368e8d4fb50c8d Mon Sep 17 00:00:00 2001 From: bruwbird Date: Fri, 16 Feb 2024 06:46:50 +0900 Subject: [PATCH] swap: remove Receiving nodes label attempts Receiving nodes should not attempt to apply a label to this transaction that is not being tracked by the receiving node --- swap/actions.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/swap/actions.go b/swap/actions.go index ce193fd0..1744d174 100644 --- a/swap/actions.go +++ b/swap/actions.go @@ -721,7 +721,7 @@ type ValidateTxAndPayClaimInvoiceAction struct{} func (p *ValidateTxAndPayClaimInvoiceAction) Execute(services *SwapServices, swap *SwapData) EventType { lc := services.lightning - onchain, wallet, validator, err := services.getOnChainServices(swap.GetChain()) + onchain, _, validator, err := services.getOnChainServices(swap.GetChain()) if err != nil { return swap.HandleError(err) } @@ -734,15 +734,6 @@ func (p *ValidateTxAndPayClaimInvoiceAction) Execute(services *SwapServices, swa if !ok { return swap.HandleError(errors.New("tx is not valid")) } - txId, err := validator.TxIdFromHex(swap.OpeningTxHex) - if err != nil { - return swap.HandleError(err) - } - err = wallet.LabelTransaction(txId, labels.Opening(swap.GetId().Short())) - if err != nil { - log.Infof("Error labeling transaction. txid: %s, label: %s, error: %v", - txId, labels.Opening(swap.GetId().Short()), err) - } var retryTime time.Duration = 120 * time.Second var interval time.Duration = 10 * time.Second