Delete unpaid (lndhub) invoices from Redis #36

Closed
opened 2021-11-23 16:39:15 +00:00 by raucao · 11 comments
Owner

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.

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.
raucao added the enhancementui/ux labels 2021-11-23 16:39:15 +00:00
Owner

Don't they automatically get removed? - not sure after which timeout?

Don't they automatically get removed? - not sure after which timeout?
Author
Owner
Author
Owner

... 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.

... 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.
Owner

could be a timeout of 24h because I think the invoices have a 24h expiry

could be a timeout of 24h because I think the invoices have a 24h expiry
Author
Owner

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.

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.
Author
Owner

... confirmed: expiry is set to 86400 seconds, i.e. 24 hours.

... confirmed: expiry is set to 86400 seconds, i.e. 24 hours.
Author
Owner

Unfortunately, unpaid invoices that are also expired are not deleted automatically:

Unfortunately, unpaid invoices that are also expired are not deleted automatically:
Author
Owner

@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 dev or deploy branch 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.)

@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 `dev` or `deploy` branch 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.)
Owner

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, 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.
Author
Owner

The invoice is created in the lnurl payment flow anyway...so actually it should be paid immediatelly.

Yeah, I would even go so far as to have it expire within 5 minutes.

> The invoice is created in the lnurl payment flow anyway...so actually it should be paid immediatelly. Yeah, I would even go so far as to have it expire within 5 minutes.
raucao changed title from Delete unpaid (lndhub) invoices to Delete unpaid (lndhub) invoices from Redis 2022-01-11 14:10:02 +00:00
Author
Owner

Closing this in favor of migrating to lndhub.go.

Closing this in favor of migrating to [lndhub.go](https://github.com/getAlby/lndhub.go).
Sign in to join this conversation.