diff options
| author | Adam Soltys <[email protected]> | 2026-06-26 11:49:07 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-26 11:49:07 -0700 |
| commit | d7d93f6e0cb5db140a842228eb42a25d2b789bd3 (patch) | |
| tree | b3162ad6a8f018136ea08626969b5760ed0ace57 | |
| parent | 0ffdac0c461e504ea92afed9a45080819cec43c1 (diff) | |
| download | coinosv3-d7d93f6e0cb5db140a842228eb42a25d2b789bd3.tar.gz coinosv3-d7d93f6e0cb5db140a842228eb42a25d2b789bd3.zip | |
Auto log-out wipes the saved-to-device vault too (full device wipe)
With a logout timer set, signing out now removes everything from the device
including the password-protected vault — nothing survives, so the recovery
phrase is required to return. Updated the setting copy to say so.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
| -rw-r--r-- | src/app.js | 19 | ||||
| -rw-r--r-- | src/i18n.js | 2 |
2 files changed, 7 insertions, 14 deletions
@@ -1025,8 +1025,8 @@ function applyBootAutoLogout() { if (!(ms > 0 && away >= ms)) return; try { sessionStorage.removeItem(ACCOUNTS_KEY); } catch {} try { localStorage.removeItem(WATCH_KEY); } catch {} + try { localStorage.removeItem(VAULT_KEY); } catch {} clearWalletCaches(); - wipeBlankVault(); } // Remove every trace of the open wallet from this device: the session, the @@ -1040,22 +1040,15 @@ function clearWalletCaches() { } catch {} } -// A blank-password vault offers no protection and would auto-unlock on the next -// open, undoing the sign-out — so wipe it too. A password-protected vault stays. -function wipeBlankVault() { - const blob = loadVaultBlob(); - if (!blob) return; - try { decryptVault(blob, ''); } catch { return; } // needs a real password — keep it - try { localStorage.removeItem(VAULT_KEY); } catch {} -} - -// Full sign-out after the app's been backgrounded past the limit. +// Full sign-out after the app's been backgrounded past the limit: remove every +// trace of every wallet from this device — including the saved-to-device vault +// (password-protected or not). You'll need your recovery phrase to get back in. function autoLogout() { if (ui.screen !== 'wallet') return; // don't interrupt unlock / claim flows try { localStorage.removeItem(WATCH_KEY); } catch {} + try { localStorage.removeItem(VAULT_KEY); } catch {} clearWalletCaches(); - wipeBlankVault(); - lock(); // wipes the session + vault password and shows the unlock / vault screen + lock(); } function lock() { diff --git a/src/i18n.js b/src/i18n.js index 71e6423..645420e 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -274,7 +274,7 @@ const STR = { explorerUrl: 'Server URL', explorerUrlHint: 'Esplora / electrs REST base, e.g. https://mempool.space/api', autolockTitle: 'Log out automatically', - autolockDesc: "After the app has been in the background this long, sign out completely — the wallet is removed from this device, so keep your recovery phrase. Saved-to-device wallets come back with their password. The timer never runs while the app is open and focused.", + autolockDesc: "After the app has been in the background this long, sign out completely — every wallet is removed from this device, including ones saved to device, so make sure you have your recovery phrase. The timer never runs while the app is open and focused.", autolockNever: 'Never', autolock1m: 'After 1 minute', autolock5m: 'After 5 minutes', |
