muun / apollo

Muun Android wallet
https://muun.com
MIT License
256 stars 46 forks source link

Ability to set expiration time for lightning invoices to meet other apps needs #87

Open PatMulligan opened 2 years ago

PatMulligan commented 2 years ago

Hey guys! I was testing out a BTCPay Server refund feature, and I ran into an issue which is that BTCPay will only refund an invoice that has an expiration time of at least 1 day. This is problematic, because Muun's automatic lightning invoice expiration time is 24 hours from the moment it's created, and then of course immediately drops below that immediately.

I will contact BTCPay Server about this as well, I don't see why a refund that's set to be approved automatically should require such a relatively long expiration time.

In general it seems like an issue that could arise again as some places may require arbitrary amounts of time for expiration? Does it make any sense to make this time limit adjustable by the user? Will let you know what BTCPay team says...

acrespo commented 2 years ago

Hey there!

Thanks for the feedback! I'll let our Product team know so we can take your suggestion into account.

Not so long ago, we increased the expiration time of our invoices to 24h due to the feedback we received. If I may ask, is this really a need to be able to configure each invoice expiration time or would having a longer expiration time be simpler/better?

Be that as it may, I'll tell you a bit about why this is problematic. The longer the expiration time the more constraints and operational load we have when upgrading or changing Lightning nodes:

Hope this shed some light on the issue. Did you manage to find out why BTCPayServer requires longer than 24h expiration times?

Don't know if this is any help but note that expiration times may be approaching its sunset (though I imagine I'll take quite some time). AFAIU with Bolt12 there's no more expiration times.

avantgarden commented 1 year ago

I'm working on app which use BOLT11 invoices. For use case of this app longer expiration date would be much appreciated. Please increase default expiration date to eg: 1 month and/or allow users set their own. Thanks