From 06fd21fd05c3ee3074bd469171d7167300d3a267 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Thu, 21 Mar 2024 14:59:24 +0100 Subject: [PATCH] loop: fill the correct HTLC in loopout update --- loopout.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/loopout.go b/loopout.go index 1fc9cdd..ebff8c3 100644 --- a/loopout.go +++ b/loopout.go @@ -306,7 +306,11 @@ func (s *loopOutSwap) sendUpdate(ctx context.Context) error { info := s.swapInfo() s.log.Infof("Loop out swap state: %v", info.State) - info.HtlcAddressP2WSH = s.htlc.Address + if s.htlc.OutputType == swap.HtlcP2WSH { + info.HtlcAddressP2WSH = s.htlc.Address + } else { + info.HtlcAddressP2TR = s.htlc.Address + } // In order to avoid potentially dangerous ownership sharing // we copy the outgoing channel set.