Skip to content

Commit 99057f7

Browse files
committed
api+store: Add lastHop parameter for loop in quotes
1 parent 6ac0757 commit 99057f7

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

app/src/api/loop.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ class LoopApi extends BaseApi<LoopEvents> {
5757
async getLoopInQuote(
5858
amount: Big,
5959
confTarget?: number,
60+
lastHop?: string,
6061
): Promise<LOOP.InQuoteResponse.AsObject> {
6162
const req = new LOOP.QuoteRequest();
6263
req.setAmt(amount.toString());
6364
if (confTarget) req.setConfTarget(confTarget);
65+
if (lastHop) req.setLoopInLastHop(b64(lastHop));
6466
const res = await this._grpc.request(SwapClient.GetLoopInQuote, req, this._meta);
6567
return res.toObject();
6668
}

app/src/store/views/buildSwapView.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ class BuildSwapView {
426426
const inQuote = await this._store.api.loop.getLoopInQuote(
427427
amount,
428428
this.confTarget,
429+
this.loopInLastHop,
429430
);
430431
quote = {
431432
swapFee: Big(inQuote.swapFeeSat),

docs/release-notes/release-notes-0.14.1.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
### Bug Fixes
1818

19+
* [Add `lastHop` parameter for Loop In
20+
quotes](https://github.com/lightninglabs/lightning-terminal/pull/920).
21+
Fixes fee estimation bug when using Loop In for a specific channel.
22+
1923
### Functional Changes/Additions
2024

2125
### Technical and Architectural Updates
@@ -38,4 +42,5 @@
3842

3943
# Contributors (Alphabetical Order)
4044

41-
* Elle Mouton
45+
* Elle Mouton
46+
* Rachel Fish

0 commit comments

Comments
 (0)