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

AMP Support for SendPaymentRequest in lnd.py, for lnd v0.18 and above. #1426

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

lft3t8bx
Copy link
Contributor

AMP Support for SendPaymentRequest in lnd.py, for lnd v0.18 and above.

When users submit an amp invoice, the payout would fail if the coordinator is running lnd v0.18 and above with the following error at the lnd backed:

[lncli] rpc error: code = Unknown desc = the AMP flag (--amp or SendPaymentRequest.Amp) must be set to pay an AMP invoice

This PR simply adds two linse in lnd.py (under pay_invoice and under follow_send_payment SendPaymentRequest) to enable AMP support when sending payments, as shown below:

request = router_pb2.SendPaymentRequest(
    payment_request=lnpayment.invoice,
    fee_limit_sat=fee_limit_sat,
    timeout_seconds=timeout_seconds,
    amp=True  # Added this line
)

This PR has been tested by Temple Of Sats coordinator for around 1 week.
No issues have been detected so far.

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

Added AMP Support for SendPaymentRequest in lnd.py, for lnd v0.18 and above
@KoalaSat
Copy link
Member

Merging to be included on the next release. Thanks @lft3t8bx for testing this out

@KoalaSat KoalaSat merged commit 27b8490 into RoboSats:main Aug 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants