@@ -3,6 +3,7 @@ package liquidity
33import (
44 "context"
55 "encoding/hex"
6+ "time"
67
78 "github.com/btcsuite/btcd/btcutil"
89 "github.com/lightninglabs/loop"
@@ -14,6 +15,12 @@ import (
1415 "github.com/lightningnetwork/lnd/routing/route"
1516)
1617
18+ const (
19+ // defaultSwapWaitTime is the default time we set as the deadline by
20+ // which we expect the swap to be published.
21+ defaultSwapPublicationWaitTime = 30 * time .Minute
22+ )
23+
1724// Compile-time assertion that loopOutBuilder satisfies the swapBuilder
1825// interface.
1926var _ swapBuilder = (* loopOutBuilder )(nil )
@@ -153,11 +160,13 @@ func (b *loopOutBuilder) buildSwap(ctx context.Context, pubkey route.Vertex,
153160
154161 quote , err := b .cfg .LoopOutQuote (
155162 ctx , & loop.LoopOutQuoteRequest {
156- Amount : amount ,
157- SweepConfTarget : params .SweepConfTarget ,
158- SwapPublicationDeadline : b .cfg .Clock .Now (),
159- Initiator : initiator ,
160- AssetRFQRequest : assetRfqRequest ,
163+ Amount : amount ,
164+ SweepConfTarget : params .SweepConfTarget ,
165+ SwapPublicationDeadline : b .cfg .Clock .Now ().Add (
166+ defaultSwapPublicationWaitTime ,
167+ ),
168+ Initiator : initiator ,
169+ AssetRFQRequest : assetRfqRequest ,
161170 },
162171 )
163172 if err != nil {
0 commit comments