Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lastHop parameter for loop in quotes #920

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/src/api/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ class LoopApi extends BaseApi<LoopEvents> {
async getLoopInQuote(
amount: Big,
confTarget?: number,
lastHop?: string,
): Promise<LOOP.InQuoteResponse.AsObject> {
const req = new LOOP.QuoteRequest();
req.setAmt(amount.toString());
if (confTarget) req.setConfTarget(confTarget);
if (lastHop) req.setLoopInLastHop(b64(lastHop));
const res = await this._grpc.request(SwapClient.GetLoopInQuote, req, this._meta);
return res.toObject();
}
Expand Down
1 change: 1 addition & 0 deletions app/src/store/views/buildSwapView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ class BuildSwapView {
const inQuote = await this._store.api.loop.getLoopInQuote(
amount,
this.confTarget,
this.loopInLastHop,
);
quote = {
swapFee: Big(inQuote.swapFeeSat),
Expand Down
7 changes: 6 additions & 1 deletion docs/release-notes/release-notes-0.14.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

### Bug Fixes

* [Add `lastHop` parameter for Loop In
quotes](https://github.com/lightninglabs/lightning-terminal/pull/920).
Fixes fee estimation bug when using Loop In for a specific channel.

### Functional Changes/Additions

### Technical and Architectural Updates
Expand All @@ -38,4 +42,5 @@

# Contributors (Alphabetical Order)

* Elle Mouton
* Elle Mouton
* Rachel Fish
Loading