title: Add Wallet Change and Session Persistence Integration Tests
Description:
Test wallet reconnects, account changes, network switches, and local session restoration across the app’s main mutation flows.
Requirements and Context:
- Wallet changes can happen while users are on deploy or campaign screens
- Incorrect session persistence can cause wrong-account submissions
- Must cover
useWallet, deploy, and campaign creation flows
Suggested Execution:
Fork and Branch
git checkout -b test/wallet-session-integration
Implement Changes::
Files to Edit:
frontend/src/hooks/useWallet.ts - Ensure change handling is testable
frontend/src/hooks/useTokenDeploy.ts - React correctly to wallet changes
frontend/src/hooks/useCampaignCreation.ts - React correctly to wallet changes
Files to Create:
frontend/src/test/integration/wallet-session.integration.test.tsx - Wallet session behavior tests
Test
- Verify account switch clears stale optimistic state when necessary
- Verify network switch blocks writes on mismatch
- Verify reconnect restores only safe session data
Commit
git add .
git commit -m "test(integration): add wallet session and network switch coverage"
Guidelines:
- Test the dangerous edges, not just initial connect
- Prefer explicit clearing of stale write context
title: Add Wallet Change and Session Persistence Integration Tests
Description:
Test wallet reconnects, account changes, network switches, and local session restoration across the app’s main mutation flows.
Requirements and Context:
useWallet, deploy, and campaign creation flowsSuggested Execution:
Fork and Branch
git checkout -b test/wallet-session-integrationImplement Changes::
Files to Edit:
frontend/src/hooks/useWallet.ts- Ensure change handling is testablefrontend/src/hooks/useTokenDeploy.ts- React correctly to wallet changesfrontend/src/hooks/useCampaignCreation.ts- React correctly to wallet changesFiles to Create:
frontend/src/test/integration/wallet-session.integration.test.tsx- Wallet session behavior testsTest
Commit
git add .git commit -m "test(integration): add wallet session and network switch coverage"Guidelines: