BTCPrivate / btcp-widget

JS widget for online shop payments
5 stars 2 forks source link

Merchant site with no focus/in BG causes update issues #67

Open mattpass opened 6 years ago

mattpass commented 6 years ago

This doesn't seem to happen on a desktop PC but happens on a phone.

Make a purchase and go do something else on the phone. View another browser tab, use another app etc so that the merchant site is in the background. Return to view site 5 mins later and it's not updated.

If you put a transfer through and do nothing else, wait, it will do what we expect.

It is suspected that to improve phone perf and battery life, the JS code and WS comms aren't running.

We may need to either run a XHR to check for updates on viewing the browser again, or better still every 30 secs ping BTCP Pay as a failsafe so at least on return we can check.

mattpass commented 6 years ago

Side note - are we storing the blockheight of the transaction?

mattpass commented 6 years ago

Could look to reconnect perhaps rather than have a 2nd manual poll?