@@ -93,18 +93,26 @@ func loopOut(ctx *cli.Context) error {
93
93
}
94
94
defer cleanup ()
95
95
96
+ // Set our maximum swap wait time. If a fast swap is requested we set
97
+ // it to now, otherwise to 30 minutes in the future.
98
+ fast := ctx .Bool ("fast" )
99
+ swapDeadline := time .Now ()
100
+ if ! fast {
101
+ swapDeadline = time .Now ().Add (defaultSwapWaitTime )
102
+ }
103
+
96
104
sweepConfTarget := int32 (ctx .Uint64 ("conf_target" ))
97
105
quoteReq := & looprpc.QuoteRequest {
98
- Amt : int64 (amt ),
99
- ConfTarget : sweepConfTarget ,
106
+ Amt : int64 (amt ),
107
+ ConfTarget : sweepConfTarget ,
108
+ SwapPublicationDeadline : uint64 (swapDeadline .Unix ()),
100
109
}
101
110
quote , err := client .LoopOutQuote (context .Background (), quoteReq )
102
111
if err != nil {
103
112
return err
104
113
}
105
114
106
115
// Show a warning if a slow swap was requested.
107
- fast := ctx .Bool ("fast" )
108
116
warning := ""
109
117
if fast {
110
118
warning = "Fast swap requested."
@@ -125,13 +133,6 @@ func loopOut(ctx *cli.Context) error {
125
133
unchargeChannel = ctx .Uint64 ("channel" )
126
134
}
127
135
128
- // Set our maximum swap wait time. If a fast swap is requested we set
129
- // it to now, otherwise to 30 minutes in the future.
130
- swapDeadline := time .Now ()
131
- if ! fast {
132
- swapDeadline = time .Now ().Add (defaultSwapWaitTime )
133
- }
134
-
135
136
resp , err := client .LoopOut (context .Background (), & looprpc.LoopOutRequest {
136
137
Amt : int64 (amt ),
137
138
Dest : destAddr ,
0 commit comments