useWalletStore in src/store/walletStore.ts has no persistence middleware, and app/index.tsx decides the initial route purely from the in-memory isOnboarded flag. Every cold start therefore redirects to /auth/welcome even though secureStorage.ts may still hold a valid secret from a previous session — at best this is a broken UX loop (user must "create" or "import" again every launch), at worst a user re-running create.tsx under this condition triggers the overwrite bug described in a related issue and loses access to their real funded address.
Definition of done:
- On cold start, check SecureStore (not just in-memory state) for an existing secret and restore
publicKey/isOnboarded accordingly before routing
- No plaintext persistence of the secret itself outside SecureStore to achieve this
- Regression test simulating a cold start with a pre-existing SecureStore entry
Before opening a PR for this issue, read CONTRIBUTING.md.
This is not a starter-issue. The Definition of done above is the full
acceptance criteria, not a subset to sample from — a PR that addresses part
of it is an unfinished issue, not a smaller one. Your PR must include, in
the PR description itself:
PRs missing these will be sent back before review, not reviewed and rejected — please do this up front.
useWalletStoreinsrc/store/walletStore.tshas no persistence middleware, andapp/index.tsxdecides the initial route purely from the in-memoryisOnboardedflag. Every cold start therefore redirects to/auth/welcomeeven thoughsecureStorage.tsmay still hold a valid secret from a previous session — at best this is a broken UX loop (user must "create" or "import" again every launch), at worst a user re-runningcreate.tsxunder this condition triggers the overwrite bug described in a related issue and loses access to their real funded address.Definition of done:
publicKey/isOnboardedaccordingly before routingBefore opening a PR for this issue, read CONTRIBUTING.md.
This is not a starter-issue. The Definition of done above is the full
acceptance criteria, not a subset to sample from — a PR that addresses part
of it is an unfinished issue, not a smaller one. Your PR must include, in
the PR description itself:
PRs missing these will be sent back before review, not reviewed and rejected — please do this up front.