@@ -590,7 +590,8 @@ func (s *loopOutSwap) payInvoices(ctx context.Context) {
590590 s .LoopOutContract .OutgoingChanSet , pluginType ,
591591 )
592592
593- // Pay the prepay invoice. Won't use the routing plugin here.
593+ // Pay the prepay invoice. Won't use the routing plugin here as the
594+ // prepay is trivially small and shouldn't normally need any help.
594595 s .log .Infof ("Sending prepayment %v" , s .PrepayInvoice )
595596 s .prePaymentChan = s .payInvoice (
596597 ctx , s .PrepayInvoice , s .MaxPrepayRoutingFee ,
@@ -670,7 +671,9 @@ func (s *loopOutSwap) payInvoiceAsync(ctx context.Context,
670671 // Extract hash from payment request. Unfortunately the request
671672 // components aren't available directly.
672673 chainParams := s .lnd .ChainParams
673- target , hash , amt , err := swap .DecodeInvoice (chainParams , invoice )
674+ target , routeHints , hash , amt , err := swap .DecodeInvoice (
675+ chainParams , invoice ,
676+ )
674677 if err != nil {
675678 return nil , err
676679 }
@@ -680,7 +683,7 @@ func (s *loopOutSwap) payInvoiceAsync(ctx context.Context,
680683
681684 // Attempt to acquire and initialize the routing plugin.
682685 routingPlugin , err := AcquireRoutingPlugin (
683- ctx , pluginType , * s .lnd , target , nil , amt ,
686+ ctx , pluginType , * s .lnd , target , routeHints , amt ,
684687 )
685688 if err != nil {
686689 return nil , err
@@ -1314,7 +1317,7 @@ func validateLoopOutContract(lnd *lndclient.LndServices,
13141317 // Check invoice amounts.
13151318 chainParams := lnd .ChainParams
13161319
1317- _ , swapInvoiceHash , swapInvoiceAmt , err := swap .DecodeInvoice (
1320+ _ , _ , swapInvoiceHash , swapInvoiceAmt , err := swap .DecodeInvoice (
13181321 chainParams , response .swapInvoice ,
13191322 )
13201323 if err != nil {
@@ -1327,7 +1330,7 @@ func validateLoopOutContract(lnd *lndclient.LndServices,
13271330 swapInvoiceHash , swapHash )
13281331 }
13291332
1330- _ , _ , prepayInvoiceAmt , err := swap .DecodeInvoice (
1333+ _ , _ , _ , prepayInvoiceAmt , err := swap .DecodeInvoice (
13311334 chainParams , response .prepayInvoice ,
13321335 )
13331336 if err != nil {
0 commit comments