mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Merge pull request #1014 from hieblmi/fix-static-quote
staticaddr: fix static quote
This commit is contained in:
commit
3323beaaeb
5 changed files with 860 additions and 828 deletions
|
|
@ -233,7 +233,13 @@ func printQuoteInResp(req *looprpc.QuoteRequest,
|
|||
totalFee := resp.HtlcPublishFeeSat + resp.SwapFeeSat
|
||||
|
||||
if req.DepositOutpoints != nil {
|
||||
fmt.Printf(satAmtFmt, "Previously deposited on-chain:", req.Amt)
|
||||
if req.Amt == 0 {
|
||||
fmt.Printf(satAmtFmt, "Previously deposited "+
|
||||
"on-chain:", resp.QuotedAmt)
|
||||
} else {
|
||||
fmt.Printf(satAmtFmt, "Previously deposited "+
|
||||
"on-chain:", req.Amt)
|
||||
}
|
||||
} else {
|
||||
fmt.Printf(satAmtFmt, "Send on-chain:", req.Amt)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1043,6 +1043,7 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
|
|||
HtlcPublishFeeSat: int64(quote.MinerFee),
|
||||
SwapFeeSat: int64(quote.SwapFee),
|
||||
ConfTarget: htlcConfTarget,
|
||||
QuotedAmt: int64(selectedAmount),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
1667
looprpc/client.pb.go
1667
looprpc/client.pb.go
File diff suppressed because it is too large
Load diff
|
|
@ -881,6 +881,13 @@ message InQuoteResponse {
|
|||
The confirmation target to be used to publish the on-chain HTLC.
|
||||
*/
|
||||
int32 conf_target = 6;
|
||||
|
||||
/*
|
||||
If the quote request was for a static address loop in and only contained
|
||||
deposit outpoints the quote response will return the total amount of the
|
||||
selected deposits.
|
||||
*/
|
||||
int64 quoted_amt = 7;
|
||||
}
|
||||
|
||||
message OutQuoteResponse {
|
||||
|
|
|
|||
|
|
@ -1074,6 +1074,11 @@
|
|||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The confirmation target to be used to publish the on-chain HTLC."
|
||||
},
|
||||
"quoted_amt": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "If the quote request was for a static address loop in and only contained\ndeposit outpoints the quote response will return the total amount of the\nselected deposits."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue