@@ -141,7 +141,7 @@ func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits {
141141 }
142142}
143143
144- func displayLimits (swapType swap.Type , amt btcutil.Amount , l * limits ,
144+ func displayLimits (swapType swap.Type , amt , minerFees btcutil.Amount , l * limits ,
145145 externalHtlc bool , warning string ) error {
146146
147147 totalSuccessMax := l .maxMinerFee + l .maxSwapFee
@@ -159,7 +159,7 @@ func displayLimits(swapType swap.Type, amt btcutil.Amount, l *limits,
159159 "wallet.\n \n " )
160160 }
161161
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 ,
163163 totalSuccessMax )
164164
165165 if warning != "" {
@@ -176,26 +176,35 @@ func displayLimits(swapType swap.Type, amt btcutil.Amount, l *limits,
176176 return nil
177177 case "x" :
178178 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+ }
182192 }
183193
184194 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:" ,
186196 * l .maxSwapRoutingFee )
187197 }
188198
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-
195199 if l .maxPrepayAmt != nil {
196- fmt .Printf ("Max no show penalty: %d \n " ,
200+ fmt .Printf (f , "Max no show penalty (prepay): " ,
197201 * l .maxPrepayAmt )
198202 }
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 )
199208
200209 fmt .Printf ("CONTINUE SWAP? (y/n): " )
201210 fmt .Scanln (& answer )
0 commit comments