lnbits / satspay

Create onchain and LN charges
MIT License
8 stars 4 forks source link

Onchain payment never marked paid once lightning invoice is cleaned up #74

Open lightningcheckout opened 2 weeks ago

lightningcheckout commented 2 weeks ago

Given the situation:

When an onchain tx is pending or not yet in the mempool the charge will never be marekd as paid once it's confirmed. When you do 'Refresh Balance' the error 'Payment not found' is give.

Most likely not foreseen in this part: https://github.com/lnbits/satspay/blob/ac4164e8f1463cea6e0d991e1d0f57d13f65a487/helpers.py#L90C1-L96C43

Since this will be done before the onchain check is perfomed.

lightningcheckout commented 2 weeks ago

A quick&dirty fix could be to swap onchain/lightning checks. BUt maybe there is a better option?

motorina0 commented 2 weeks ago

I've added a fix in this PR: https://github.com/lnbits/satspay/pull/75

Currently we are in the process of upgrading to LNbits v1.0, so the above PR (although small) it will not be released right away.

Is this an urgent issue?

lightningcheckout commented 2 weeks ago

I've added a fix in this PR: #75

Currently we are in the process of upgrading to LNbits v1.0, so the above PR (although small) it will not be released right away.

Is this an urgent issue?

Awesome, the fix I proposed wasn't working I already tested. So this is much better. I can wait, since I can fix it in my own fork in the same way. Thanks for the quick fix.