Delete unpaid (lndhub) invoices from Redis #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
They currently show up in Blue Wallet, which is potentially very confusing, because they haven't been created from Blue Wallet, and with lnurlp, not even by the user themselves.
Don't they automatically get removed? - not sure after which timeout?
Unfortunately not:
... I think that's just a very bad UX choice for Blue Wallet tbh. An unpaid invoice should not show in "Transactions" in my opininon, as no transaction has taken place yet. So maybe we can get it fixed upstream instead.
could be a timeout of 24h because I think the invoices have a 24h expiry
So maybe we can set a more reasonable timeout then. But in any case, it's not good to have invoices show up as "transactions", when the user hasn't even created the payment request themselves.
... confirmed: expiry is set to 86400 seconds, i.e. 24 hours.
Unfortunately, unpaid invoices that are also expired are not deleted automatically:
@kosmos/Core I think the default expiry for lnurlp requests should be very short, and that invoices should be removed from Redis immediately after expiry.
I guess the best way for dealing with these and other changes would be to create a
devordeploybranch on a Kosmos fork of LndHub, and merge our PR branches, that are targeted at the upstream repo, into our deploy branch. WDYT?(Incidentally, the new Gitea version I just deployed supports auto-pushing to mirrors, so we could have the fork on our Gitea and do PRs from a GitHub push mirror.)
yeah, no idea why they have an expiry of 24h (https://github.com/BlueWallet/LndHub/blob/master/controllers/api.js#L194) imo this should be more like 1h. The invoice is created in the lnurl payment flow anyway...so actually it should be paid immediatelly.
would be intersting to hear their reasoning.
guess having a kosmos for at this point makes sense.
Yeah, I would even go so far as to have it expire within 5 minutes.
Delete unpaid (lndhub) invoicesto Delete unpaid (lndhub) invoices from RedisClosing this in favor of migrating to lndhub.go.