bitkit icon indicating copy to clipboard operation
bitkit copied to clipboard

[Feature]: "Keep app open" reminder when viewing LN invoice

Open catch-21 opened this issue 1 year ago • 4 comments

Describe the problem

Bitkit needs to remain in the foreground to receive payment via LN. We know some users will produce an invoice and copy it to send from another app on the same device, this will often not work.

See internal discussion https://synonymworkspace.slack.com/archives/C01H106JRQB/p1723735706112959

Describe the solution

We could do with a reminder on the LN invoice page so the user is aware of this limitation.

Additional context

Include in automated test suite.

catch-21 avatar Aug 16 '24 10:08 catch-21

The user should have a short time window available to pay themselves using with a different Lightning wallet, even when switching between apps, where Bitkit is pushed to the background. We have tested this ourselves and have seen users do this successfully in BTC Prague. Perhaps this does not work for CJIT invoices somehow? That would be odd, as these are Blocktank invoices afaik and thus don't require the user to be online.

aldertnl avatar Aug 21 '24 08:08 aldertnl

The window where it works is very short I think. If we are going to make decisions based on this, we should test the limits of how long this works and be sure it is acceptable. My guess is that the window is not long enough to accommodate most real-world situations, but I am just guessing.

BitcoinErrorLog avatar Aug 21 '24 10:08 BitcoinErrorLog

@catch-21 could you perhaps test what the available time window is on iOS & Android to pay between Lightning wallets?

aldertnl avatar Aug 22 '24 18:08 aldertnl

I can try but it may vary by device. I've never had an issue using two apps this way but my device has plenty of RAM and it's up to the OS to manage resources. Modern versions of Android and iOS aim to allow apps to complete background tasks for a few minutes after being closed. However, older devices with resource-intensive apps will more likely experience the OS reallocating resources sooner as a priority. You also have the option to be more aggressive with battery optimisation.

catch-21 avatar Aug 28 '24 16:08 catch-21

added to prototype v52

aldertnl avatar Oct 22 '24 12:10 aldertnl

This was implemented in https://github.com/synonymdev/bitkit/pull/2346

pwltr avatar Dec 17 '24 14:12 pwltr