Skip to content

Add Wallet Change and Session Persistence Integration Tests #648

@Emmyt24

Description

@Emmyt24

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions