Closed dni closed 7 months ago
Hey Ho thank you! We are waiting for this fix 🥰
Just an idea, because now a withdraw link can be used =+1
and get's marked as "It has been used and can't be used in the future, which is good ;) ... but if the pay_invoice
is throwing an exception or the payment is still pending (and will be later invalid) the counter used
is not decreased.
We can work around this, but we can't relate between lnurlw and the payments the apipayments table. (btw. we is Satoshi Engineering 👋)
Could you (maybe) add the lnurlw_id
to the apipayments.extra
field?
https://github.com/lnbits/withdraw/blob/2fc4fad7579531ea81dd0caca3724e00ed5fa34a/lnurl.py#L115 like
payment_hash = await pay_invoice(
wallet_id=link.wallet,
payment_request=pr,
max_sat=link.max_withdrawable,
extra={"tag": "withdraw", "lnurlw_id": link.id },
)
(Sorry for not dooing a merge request, haven't figured out how to dev on lnbits with an extension 🙈)
Cheers and Thanks for your fast responses, Fil
fixes issue in used withdraws