@@ -141,7 +141,7 @@ func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits {
141
141
}
142
142
}
143
143
144
- func displayLimits (swapType swap.Type , amt btcutil.Amount , l * limits ,
144
+ func displayLimits (swapType swap.Type , amt , minerFees btcutil.Amount , l * limits ,
145
145
externalHtlc bool , warning string ) error {
146
146
147
147
totalSuccessMax := l .maxMinerFee + l .maxSwapFee
@@ -159,7 +159,7 @@ func displayLimits(swapType swap.Type, amt btcutil.Amount, l *limits,
159
159
"wallet.\n \n " )
160
160
}
161
161
162
- fmt .Printf ("Max swap fees for %d Loop %v: %d\n " , amt , swapType ,
162
+ fmt .Printf ("Max swap fees for %d sat Loop %v: %d sat \n " , amt , swapType ,
163
163
totalSuccessMax )
164
164
165
165
if warning != "" {
@@ -176,26 +176,35 @@ func displayLimits(swapType swap.Type, amt btcutil.Amount, l *limits,
176
176
return nil
177
177
case "x" :
178
178
fmt .Println ()
179
- if swapType != swap .TypeIn || ! externalHtlc {
180
- fmt .Printf ("Max on-chain fee: %d\n " ,
181
- l .maxMinerFee )
179
+ f := "%-36s %d sat\n "
180
+
181
+ switch swapType {
182
+ case swap .TypeOut :
183
+ fmt .Printf (f , "Estimated on-chain sweep fee:" ,
184
+ minerFees )
185
+ fmt .Printf (f , "Max on-chain sweep fee:" , l .maxMinerFee )
186
+
187
+ case swap .TypeIn :
188
+ if ! externalHtlc {
189
+ fmt .Printf (f , "Estimated on-chain HTLC fee:" ,
190
+ minerFees )
191
+ }
182
192
}
183
193
184
194
if l .maxSwapRoutingFee != nil {
185
- fmt .Printf ("Max off-chain swap routing fee: %d \n " ,
195
+ fmt .Printf (f , "Max off-chain swap routing fee:" ,
186
196
* l .maxSwapRoutingFee )
187
197
}
188
198
189
- if l .maxPrepayRoutingFee != nil {
190
- fmt .Printf ("Max off-chain prepay routing fee: %d\n " ,
191
- * l .maxPrepayRoutingFee )
192
- }
193
- fmt .Printf ("Max swap fee: %d\n " , l .maxSwapFee )
194
-
195
199
if l .maxPrepayAmt != nil {
196
- fmt .Printf ("Max no show penalty: %d \n " ,
200
+ fmt .Printf (f , "Max no show penalty (prepay): " ,
197
201
* l .maxPrepayAmt )
198
202
}
203
+ if l .maxPrepayRoutingFee != nil {
204
+ fmt .Printf (f , "Max off-chain prepay routing fee:" ,
205
+ * l .maxPrepayRoutingFee )
206
+ }
207
+ fmt .Printf (f , "Max swap fee:" , l .maxSwapFee )
199
208
200
209
fmt .Printf ("CONTINUE SWAP? (y/n): " )
201
210
fmt .Scanln (& answer )
0 commit comments