Skip to content

Commit 3323bea

Browse files
authored
Merge pull request #1014 from hieblmi/fix-static-quote
staticaddr: fix static quote
2 parents c1ab1f3 + 39b3752 commit 3323bea

File tree

5 files changed

+859
-827
lines changed

5 files changed

+859
-827
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
}

loopd/swapclient_server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
10431043
HtlcPublishFeeSat: int64(quote.MinerFee),
10441044
SwapFeeSat: int64(quote.SwapFee),
10451045
ConfTarget: htlcConfTarget,
1046+
QuotedAmt: int64(selectedAmount),
10461047
}, nil
10471048
}
10481049

0 commit comments

Comments
 (0)