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

feat: gateway can pay invoices as itself #5868

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

tvolk131
Copy link
Member

@tvolk131 tvolk131 commented Aug 15, 2024

Gateway can pay invoices as itself (i.e. no e-cash swap, just pay using its own funds)

@tvolk131 tvolk131 force-pushed the gateway_pay_normal_invoice branch 2 times, most recently from ede01d1 to 34db077 Compare August 15, 2024 20:11
@tvolk131 tvolk131 marked this pull request as ready for review August 15, 2024 20:16
@tvolk131 tvolk131 requested review from a team as code owners August 15, 2024 20:16
Copy link
Member

@Kodylow Kodylow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to distinguish between when the gateway itself is paying or creating invoices or when it's doing actions on behalf of a client contract

gateway/cli/Cargo.toml Outdated Show resolved Hide resolved
gateway/cli/Cargo.toml Outdated Show resolved Hide resolved
gateway/cli/src/lightning_commands.rs Outdated Show resolved Hide resolved
gateway/cli/src/lightning_commands.rs Show resolved Hide resolved
gateway/ln-gateway/src/lib.rs Outdated Show resolved Hide resolved
gateway/ln-gateway/src/rpc/rpc_server.rs Outdated Show resolved Hide resolved
@tvolk131 tvolk131 force-pushed the gateway_pay_normal_invoice branch 2 times, most recently from 947c724 to 32528ee Compare August 21, 2024 20:05
@tvolk131 tvolk131 changed the title feat: gateway can pay normal invoices feat: gateway can pay invoices as itself Aug 21, 2024
@tvolk131 tvolk131 requested a review from Kodylow August 21, 2024 20:06
@tvolk131 tvolk131 force-pushed the gateway_pay_normal_invoice branch from 32528ee to 9e96350 Compare August 21, 2024 20:43
Kodylow
Kodylow previously approved these changes Aug 21, 2024
Copy link
Member

@Kodylow Kodylow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally, looks good, just rebase and we can land

@tvolk131 tvolk131 added this pull request to the merge queue Aug 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2024
@tvolk131 tvolk131 added this pull request to the merge queue Aug 22, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2024
feat: gateway can pay invoices as itself
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2024
@elsirion elsirion added this pull request to the merge queue Aug 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2024
Copy link
Contributor

@m1sterc001guy m1sterc001guy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be an authenticated endpoint

Kodylow
Kodylow previously approved these changes Aug 26, 2024
max_fee: max_fee_msats,
})
.await?;
println!("{response}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we're not using print_response?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for types that implement std::fmt::Display, print_response() will wrap the value in quotations where as using println!() simply prints the value.

m1sterc001guy
m1sterc001guy previously approved these changes Aug 26, 2024
Copy link
Contributor

@m1sterc001guy m1sterc001guy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small nits

@elsirion elsirion added this pull request to the merge queue Aug 26, 2024
@tvolk131 tvolk131 dismissed stale reviews from m1sterc001guy and Kodylow via c88021b August 26, 2024 20:12
@tvolk131 tvolk131 force-pushed the gateway_pay_normal_invoice branch from 5440279 to c88021b Compare August 26, 2024 20:12
@tvolk131 tvolk131 requested a review from m1sterc001guy August 26, 2024 20:12
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 26, 2024
@tvolk131 tvolk131 added this pull request to the merge queue Aug 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 26, 2024
@tvolk131 tvolk131 added this pull request to the merge queue Aug 27, 2024
Merged via the queue into fedimint:master with commit 8d01951 Aug 27, 2024
23 checks passed
@tvolk131 tvolk131 deleted the gateway_pay_normal_invoice branch August 27, 2024 05:43
@fedimint-backports
Copy link

Backport failed for releases/v0.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin releases/v0.4
git worktree add -d .worktree/backport-5868-to-releases/v0.4 origin/releases/v0.4
cd .worktree/backport-5868-to-releases/v0.4
git switch --create backport-5868-to-releases/v0.4
git cherry-pick -x c88021b4d136d83bc1da79bb76e99eaeac52f6ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants