mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: integrate the probe api with loop-in quote
In this commit we add a call to the new probe endpoint directly into the loop-in quote call. Furthermore we add an option to include private channels in the loopin swap payment request. This is also useful for when users quote/probe directly using the client API and specify hop hints.
This commit is contained in:
parent
f786aaa016
commit
0e7ed91d5d
8 changed files with 368 additions and 311 deletions
|
|
@ -82,9 +82,14 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig,
|
|||
|
||||
// Request current server loop in terms and use these to calculate the
|
||||
// swap fee that we should subtract from the swap amount in the payment
|
||||
// request that we send to the server.
|
||||
// request that we send to the server. We pass nil as optional route
|
||||
// hints as hop hint selection when generating invoices with private
|
||||
// channels is an LND side black box feaure. Advanced users will quote
|
||||
// directly anyway and there they have the option to add specific
|
||||
// route hints.
|
||||
quote, err := cfg.server.GetLoopInQuote(
|
||||
globalCtx, request.Amount, cfg.lnd.NodePubkey, request.LastHop,
|
||||
nil,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, wrapGrpcError("loop in terms", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue