diff options
| author | Adam Soltys <[email protected]> | 2026-08-17 07:03:28 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-17 07:03:28 -0700 |
| commit | 49ae68290099bc37bbbf6d7ad4dee9f906623a38 (patch) | |
| tree | 01a84328f75caeaa5cd1801e4f49bb7839d1d0f9 /src/app.js | |
| parent | ede4516e2255bb65d22dd1a74d0e8332b0417194 (diff) | |
| download | coinosv3-49ae68290099bc37bbbf6d7ad4dee9f906623a38.tar.gz coinosv3-49ae68290099bc37bbbf6d7ad4dee9f906623a38.zip | |
The profile grows a second, honest exit: Log out leaves the room, Log out & forget this device burns it down — behind the Delete-all warning, which now also sweeps the cached balances and history it always implied
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/app.js')
| -rw-r--r-- | src/app.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -2497,6 +2497,10 @@ function accountSettingsScreen() { // Wipe every wallet from this device: session accounts, the encrypted vault, // and saved watch-only accounts. Unbacked-up seeds are unrecoverable after this. function clearAll() { + // Forget means forget: cached balances, history and feature state go with + // the seeds (best effort — a still-locked vault's mnemonic-keyed caches + // can't be found without its password; the xpub-keyed ones still match). + for (const a of [...accounts, ...loadWatchAccounts()]) wipeAccountCache(a); try { localStorage.removeItem(VAULT_KEY); } catch {} try { localStorage.removeItem(WATCH_KEY); } catch {} ui.confirmClear = false; @@ -4167,6 +4171,14 @@ const ctx = { // start page (Get started / sign in). Saved wallets stay one Unlock away. if (!ui.pw) { ui.screen = 'unlock'; ui.unlockTab = 'create'; ui.onb = { step: 'welcome' }; render(); } }, + // The drastic exit: leave AND remove everything saved on this device. + // Routes through the Delete-all warning — never a single tap. + logoutForget: () => { + ui.profilePk = null; ui.profEdit = null; ui.profEditFilled = false; ui.chatOpen = false; + ui.screen = 'accounts'; + ui.confirmClear = true; + render(); + }, // the identity the header avatar currently wears (login > seed key > // remembered) — profile "mine"-ness must match what the user clicked shownPubkey: () => (featureHook('nostrLoginIdentity') || {}).pubkey |
