Difficulty: Hard
Type: Bug
Summary
Ensure wallet-specific query data is cleared when the user disconnects or resets the app. This prevents data from a previous wallet from remaining visible after account changes.
Current Behaviour
The wallet store clears walletAddress and isConnected, but TanStack Query cache entries for memberships, guild details, roles, or access checks are not explicitly cleared.
Expected Behaviour
Disconnecting or resetting the app should remove wallet-scoped cached data and prevent stale membership or role information from appearing for the next user.
Suggested Implementation
Add a wallet-aware cache clearing flow. This can be implemented by calling queryClient.removeQueries or queryClient.clear from a logout/reset service, then routing the user back to onboarding or profile.
Files or Areas Likely Affected
src/features/wallet/wallet.store.ts
src/features/wallet/useWallet.ts
src/lib/queryClient.ts
app/settings.tsx
app/profile.tsx
tests/
Acceptance Criteria
Additional Notes
Use targeted cache removal if global cache clearing would remove non-sensitive app configuration unnecessarily.
Difficulty: Hard
Type: Bug
Summary
Ensure wallet-specific query data is cleared when the user disconnects or resets the app. This prevents data from a previous wallet from remaining visible after account changes.
Current Behaviour
The wallet store clears
walletAddressandisConnected, but TanStack Query cache entries for memberships, guild details, roles, or access checks are not explicitly cleared.Expected Behaviour
Disconnecting or resetting the app should remove wallet-scoped cached data and prevent stale membership or role information from appearing for the next user.
Suggested Implementation
Add a wallet-aware cache clearing flow. This can be implemented by calling
queryClient.removeQueriesorqueryClient.clearfrom a logout/reset service, then routing the user back to onboarding or profile.Files or Areas Likely Affected
src/features/wallet/wallet.store.tssrc/features/wallet/useWallet.tssrc/lib/queryClient.tsapp/settings.tsxapp/profile.tsxtests/Acceptance Criteria
Additional Notes
Use targeted cache removal if global cache clearing would remove non-sensitive app configuration unnecessarily.