[Cashtab] Request persistent storage
Summary:
T2769
Cashtab has had reports of storage issues that differ across browsers and devices. Because Cashtab uses indexedDb, which is managed by the browser, user data may be lost by normal browser operations like clearing history. In some cases, browser data may be wiped without user action, e.g. when temporary internet file storage becomes heavily used by other apps.
This diff requests persistent storage. Not easy to test the effectiveness of this without waiting to see what status of future memory issues is over the coming weeks and months. However, in testing, confirmed that Cashtab storage was not persistent previously, and that after running Cashtab on this diff, persistent storage is granted.
Test Plan:
npm start
View dev console. Should see that persistent storage is false, and then true after a request. If the page is reloaded, storage is simply true.
Repeat in firefox. Note that firefox pulls up a modal asking user approval of persistent storage request.
npm run extension
Open the extension tile
Right click on the tile and inspect source to see the same thing
Note: the first time I ran this, it auto-closed the extension, probably a side-effect of the request. However it opened fine after that and still worked at components.cashtab.com
Reviewers: #bitcoin_abc, emack
Reviewed By: #bitcoin_abc, emack
Differential Revision: https://reviews.bitcoinabc.org/D12542