walletStore has no tests: connection and account state is uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
walletStore (src/store/walletStore.ts) holds the app's wallet connection state — the store every wallet-gated component reads. It has no tests. A regression that leaves a stale account after disconnect or drops the connected state ships silently at the center of the wallet UX.
Why this is architecturally hard
- State transitions are the test design. Tests must pin connect (account + chain), disconnect (full reset), and switching-account paths.
- Persistence interaction. If the store hydrates from storage (see
useWalletHydration), tests must cover the hydration merge so the two cannot disagree.
Acceptance criteria
- Tests cover connect, disconnect, account switch, and hydration merge.
- Tests run in CI via
npm test.
Out of scope
Connector internals; other stores.
Getting started
src/store/walletStore.ts — the store
src/store/__tests__/transactionStore.test.ts — the existing store test pattern
Commands: npm test.
Good first files to read: src/store/walletStore.ts, src/store/__tests__/transactionStore.test.ts.
walletStore has no tests: connection and account state is uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
walletStore(src/store/walletStore.ts) holds the app's wallet connection state — the store every wallet-gated component reads. It has no tests. A regression that leaves a stale account after disconnect or drops the connected state ships silently at the center of the wallet UX.Why this is architecturally hard
useWalletHydration), tests must cover the hydration merge so the two cannot disagree.Acceptance criteria
npm test.Out of scope
Connector internals; other stores.
Getting started
src/store/walletStore.ts— the storesrc/store/__tests__/transactionStore.test.ts— the existing store test patternCommands:
npm test.Good first files to read:
src/store/walletStore.ts,src/store/__tests__/transactionStore.test.ts.