Skip to content

fix(wallet): reset TransactionPanel state on wallet disconnect or account switch - #985

Open
area523ufo wants to merge 2 commits into
Sorokit:mainfrom
area523ufo:fix/wallet-flow-disconnect-desync-967
Open

area523ufo wants to merge 2 commits into
Sorokit:mainfrom
area523ufo:fix/wallet-flow-disconnect-desync-967

Conversation

@area523ufo

Copy link
Copy Markdown

Summary

Fixes state desynchronization in src/components/TransactionPanel.tsx when a connected wallet disconnects or switches accounts mid-flow, and adds integration coverage in src/__tests__/wallet-flow.test.tsx.

Changes

  • Added an effect watching wallet?.publicKey and wallet?.isConnected in TransactionPanel so disconnecting or switching accounts immediately clears stale status, errorMessage, txHash, and form state.
  • Added multi-step wallet connect/disconnect/account-switch integration tests in src/__tests__/wallet-flow.test.tsx (3/3 passing).

Closes #967

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle wallet disconnect during simulation and ledger desync in wallet-flow.test.tsx

1 participant