Skip to content

Commit a1ae2bd

Browse files
committed
api+store: Add lastHop parameter for loop in quotes
1 parent 62e73ff commit a1ae2bd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
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: 7 additions & 2 deletions
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
@@ -36,7 +40,7 @@
3640

3741
### Pool
3842

39-
### Faraday
43+
### Faradayaa
4044

4145
* The integrated `faraday` instance was
4246
[updated](https://github.com/lightninglabs/lightning-terminal/pull/952) to
@@ -55,5 +59,6 @@
5559
* Elle Mouton
5660
* jiangmencity
5761
* Oliver Gugger
62+
* Rachel Fish
5863
* Tristav
59-
* zhoufanjin
64+
* zhoufanjin

0 commit comments

Comments
 (0)