lnbits / withdraw

LNbits Withdraw Extension
MIT License
6 stars 9 forks source link

LNURLw cannot be reused after a failed withdrawal attempt #27

Open thespielplatz opened 4 months ago

thespielplatz commented 4 months ago

Versions:

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:

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.