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

LNURLw cannot be reused after a failed withdrawal attempt #27

Open
thespielplatz opened this issue Apr 19, 2024 · 0 comments
Open

LNURLw cannot be reused after a failed withdrawal attempt #27

thespielplatz opened this issue Apr 19, 2024 · 0 comments

Comments

@thespielplatz
Copy link

Versions:

  • LNbits version: 0.12.2
  • lnurlw: 0.1.5

Description:
When a withdrawal via LNURLw fails, the withdrawal count (used) in the UI increments, preventing the same LNURLw from being reused. This issue can be reproduced, if the failure is instantaneous e.g.when a payment is rejected because it originates from the same LND node (self-payments are in some cases not allowed by LND).

Steps to Reproduce:

  • Create a new LNURLw with a limit of one withdrawal.
  • Attempt to make a withdrawal by sending an invoice from the same LND node back to the LNURLw callback for payment.
  • Observe that the payment fails immediately with the error self-payments not allowed (by LND)
  • Note that the withdrawal count has incremented, and the LNURLw can no longer be reused.

Expected Behavior:
If a payment fails instantly (e.g., due to self-payments not allowed), the withdrawal count should decrease again and the same LNURLw should be available for reuse.

Additional Consideration:
Optionally, if a payment remains pending and is later invalidated, it would be beneficial if the same LNURLw could be reused in these scenarios as well.

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

No branches or pull requests

1 participant