File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -229,23 +229,22 @@ func printQuoteInResp(req *looprpc.QuoteRequest,
229229 resp * looprpc.InQuoteResponse , verbose bool ) {
230230
231231 totalFee := resp .HtlcPublishFeeSat + resp .SwapFeeSat
232+ amt := req .Amt
233+ if amt == 0 {
234+ amt = resp .QuotedAmt
235+ }
232236
233237 if req .DepositOutpoints != nil {
234- if req .Amt == 0 {
235- fmt .Printf (satAmtFmt , "Previously deposited " +
236- "on-chain:" , resp .QuotedAmt )
237- } else {
238- fmt .Printf (satAmtFmt , "Previously deposited " +
239- "on-chain:" , req .Amt )
240- }
238+ fmt .Printf (satAmtFmt , "Previously deposited on-chain:" ,
239+ amt )
241240 } else {
242- fmt .Printf (satAmtFmt , "Send on-chain:" , req . Amt )
241+ fmt .Printf (satAmtFmt , "Send on-chain:" , amt )
243242 }
244- fmt .Printf (satAmtFmt , "Receive off-chain:" , req . Amt - totalFee )
243+ fmt .Printf (satAmtFmt , "Receive off-chain:" , amt - totalFee )
245244
246245 switch {
247246 case req .ExternalHtlc && ! verbose :
248- // If it's external then we don't know the miner fee hence the
247+ // If it's external, then we don't know the miner fee hence the
249248 // total cost.
250249 fmt .Printf (satAmtFmt , "Loop service fee:" , resp .SwapFeeSat )
251250
You can’t perform that action at this time.
0 commit comments