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 @@ -231,23 +231,22 @@ func printQuoteInResp(req *looprpc.QuoteRequest,
231231 resp * looprpc.InQuoteResponse , verbose bool ) {
232232
233233 totalFee := resp .HtlcPublishFeeSat + resp .SwapFeeSat
234+ amt := req .Amt
235+ if amt == 0 {
236+ amt = resp .QuotedAmt
237+ }
234238
235239 if req .DepositOutpoints != nil {
236- if req .Amt == 0 {
237- fmt .Printf (satAmtFmt , "Previously deposited " +
238- "on-chain:" , resp .QuotedAmt )
239- } else {
240- fmt .Printf (satAmtFmt , "Previously deposited " +
241- "on-chain:" , req .Amt )
242- }
240+ fmt .Printf (satAmtFmt , "Previously deposited on-chain:" ,
241+ amt )
243242 } else {
244- fmt .Printf (satAmtFmt , "Send on-chain:" , req . Amt )
243+ fmt .Printf (satAmtFmt , "Send on-chain:" , amt )
245244 }
246- fmt .Printf (satAmtFmt , "Receive off-chain:" , req . Amt - totalFee )
245+ fmt .Printf (satAmtFmt , "Receive off-chain:" , amt - totalFee )
247246
248247 switch {
249248 case req .ExternalHtlc && ! verbose :
250- // If it's external then we don't know the miner fee hence the
249+ // If it's external, then we don't know the miner fee hence the
251250 // total cost.
252251 fmt .Printf (satAmtFmt , "Loop service fee:" , resp .SwapFeeSat )
253252
You can’t perform that action at this time.
0 commit comments