diff --git a/src/logic/mutinyWalletSetup.ts b/src/logic/mutinyWalletSetup.ts index 1ae65b6..176c043 100644 --- a/src/logic/mutinyWalletSetup.ts +++ b/src/logic/mutinyWalletSetup.ts @@ -197,6 +197,22 @@ export async function setupMutinyWallet( ): Promise { console.log("Starting setup..."); + // https://developer.mozilla.org/en-US/docs/Web/API/Storage_API + // Ask the browser to not clear storage + if (navigator.storage && navigator.storage.persist) { + navigator.storage.persist().then((persistent) => { + if (persistent) { + console.log( + "Storage will not be cleared except by explicit user action" + ); + } else { + console.log( + "Storage may be cleared by the UA under storage pressure." + ); + } + }); + } + const { network, proxy,