Skip to content

Commit 39b3752

Browse files
committed
cmd: print quoted amount from InQuoteRequst
1 parent 68baebf commit 39b3752

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/loop/quote.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,13 @@ func printQuoteInResp(req *looprpc.QuoteRequest,
233233
totalFee := resp.HtlcPublishFeeSat + resp.SwapFeeSat
234234

235235
if req.DepositOutpoints != nil {
236-
fmt.Printf(satAmtFmt, "Previously deposited on-chain:", req.Amt)
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+
}
237243
} else {
238244
fmt.Printf(satAmtFmt, "Send on-chain:", req.Amt)
239245
}

0 commit comments

Comments
 (0)