fix: derive hasWallet from the wallet list on load (closes #195)
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
loadState() took hasWallet straight from storage, so any profile persisted with the flag out of step with wallets stayed broken on every subsequent load rather than only until the next write. The flag is now derived from wallets.length at load time. The only consumer is the popup's welcome-vs-wallet-list gate in src/popup/index.js; the only writers set it true alongside an added wallet. Nothing reads it expecting it to differ from wallets.length, so deriving is safe and needs no write-back on load.
This commit is contained in:
4
TODO.md
4
TODO.md
@@ -44,6 +44,10 @@ undefined identifiers, which is how
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-08-11: `loadState()` now derives `hasWallet` from the wallet list instead
|
||||
of trusting the persisted flag, so a profile already saved inconsistent no
|
||||
longer stays broken on every load
|
||||
([#195](https://git.eeqj.de/sneak/AutistMask/issues/195)).
|
||||
- 2026-08-11: `TODO.md` Workflow rewritten to the branch-and-PR-per-issue model
|
||||
on `next`, with Status and Next Step refreshed
|
||||
([#191](https://git.eeqj.de/sneak/AutistMask/issues/191)).
|
||||
|
||||
Reference in New Issue
Block a user