@@ -230,10 +230,9 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
230230
231231 var swapType clientrpc.SwapType
232232 var (
233- htlcAddress string
234- htlcAddressP2TR string
235- htlcAddressP2WSH string
236- htlcAddressNP2WSH string
233+ htlcAddress string
234+ htlcAddressP2TR string
235+ htlcAddressP2WSH string
237236 )
238237 var outGoingChanSet []uint64
239238 var lastHop []byte
@@ -248,14 +247,7 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
248247 } else {
249248 htlcAddressP2WSH =
250249 loopSwap .HtlcAddressP2WSH .EncodeAddress ()
251-
252- if loopSwap .ExternalHtlc {
253- htlcAddressNP2WSH =
254- loopSwap .HtlcAddressNP2WSH .EncodeAddress ()
255- htlcAddress = htlcAddressNP2WSH
256- } else {
257- htlcAddress = htlcAddressP2WSH
258- }
250+ htlcAddress = htlcAddressP2WSH
259251 }
260252
261253 if loopSwap .LastHop != nil {
@@ -279,24 +271,23 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
279271 }
280272
281273 return & clientrpc.SwapStatus {
282- Amt : int64 (loopSwap .AmountRequested ),
283- Id : loopSwap .SwapHash .String (),
284- IdBytes : loopSwap .SwapHash [:],
285- State : state ,
286- FailureReason : failureReason ,
287- InitiationTime : loopSwap .InitiationTime .UnixNano (),
288- LastUpdateTime : loopSwap .LastUpdate .UnixNano (),
289- HtlcAddress : htlcAddress ,
290- HtlcAddressP2Tr : htlcAddressP2TR ,
291- HtlcAddressP2Wsh : htlcAddressP2WSH ,
292- HtlcAddressNp2Wsh : htlcAddressNP2WSH ,
293- Type : swapType ,
294- CostServer : int64 (loopSwap .Cost .Server ),
295- CostOnchain : int64 (loopSwap .Cost .Onchain ),
296- CostOffchain : int64 (loopSwap .Cost .Offchain ),
297- Label : loopSwap .Label ,
298- LastHop : lastHop ,
299- OutgoingChanSet : outGoingChanSet ,
274+ Amt : int64 (loopSwap .AmountRequested ),
275+ Id : loopSwap .SwapHash .String (),
276+ IdBytes : loopSwap .SwapHash [:],
277+ State : state ,
278+ FailureReason : failureReason ,
279+ InitiationTime : loopSwap .InitiationTime .UnixNano (),
280+ LastUpdateTime : loopSwap .LastUpdate .UnixNano (),
281+ HtlcAddress : htlcAddress ,
282+ HtlcAddressP2Tr : htlcAddressP2TR ,
283+ HtlcAddressP2Wsh : htlcAddressP2WSH ,
284+ Type : swapType ,
285+ CostServer : int64 (loopSwap .Cost .Server ),
286+ CostOnchain : int64 (loopSwap .Cost .Onchain ),
287+ CostOffchain : int64 (loopSwap .Cost .Offchain ),
288+ Label : loopSwap .Label ,
289+ LastHop : lastHop ,
290+ OutgoingChanSet : outGoingChanSet ,
300291 }, nil
301292}
302293
@@ -701,15 +692,9 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
701692 }
702693
703694 if loopdb .CurrentProtocolVersion () < loopdb .ProtocolVersionHtlcV3 {
704- if req .ExternalHtlc {
705- np2wshAddr := swapInfo .HtlcAddressNP2WSH .String ()
706- response .HtlcAddress = np2wshAddr
707- response .HtlcAddressNp2Wsh = np2wshAddr
708- } else {
709- p2wshAddr := swapInfo .HtlcAddressP2WSH .String ()
710- response .HtlcAddress = p2wshAddr
711- response .HtlcAddressP2Wsh = p2wshAddr
712- }
695+ p2wshAddr := swapInfo .HtlcAddressP2WSH .String ()
696+ response .HtlcAddress = p2wshAddr
697+ response .HtlcAddressP2Wsh = p2wshAddr
713698 } else {
714699 p2trAddr := swapInfo .HtlcAddressP2TR .String ()
715700 response .HtlcAddress = p2trAddr
0 commit comments