Skip to content

fix(frontend): disconnect injected wallet locally - #33

Merged
psatomas merged 1 commit into
mainfrom
fix/frontend-wallet-local-disconnect
Oct 4, 2026
Merged

psatomas merged 1 commit into
mainfrom
fix/frontend-wallet-local-disconnect

Conversation

@psatomas

@psatomas psatomas commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the real MetaMask reconnect failure after an ExeKPro Disconnect. wagmi’s stock injected connector sends wallet_revokePermissions during disconnect, but its local timeout does not cancel the MetaMask request. A following injected connect can race the still-pending revocation/permission lifecycle and MetaMask rejects it as already processing.

Earlier polling and retry approaches could only react to variable wallet timing; they could not eliminate the outstanding revocation request.

ExeKPro Disconnect now clears only its application/wagmi connection state and deliberately does not revoke the MetaMask site permission. Reconnect uses the normal injected connect path without racing a pending permission revocation.

multiInjectedProviderDiscovery is disabled deliberately: otherwise an automatically discovered stock injected connector could bypass the local-only disconnect wrapper. The trade-off is one legacy window.ethereum injected connector instead of per-wallet EIP-6963 selection.

Regression coverage

The permanent frontend E2E now verifies connect → disconnect → immediate reconnect → successful reconnect and records provider RPC methods to assert normal application Disconnect never calls wallet_revokePermissions.

Validation

  • Real MetaMask manual verification passed locally on Anvil chain 31337.
  • Canonical local deployment restored with ./scripts/deploy-local.sh; configured deterministic addresses matched deployed code.
  • npm run e2e --workspace=apps/frontend passed.
  • npm run typecheck passed.
  • npm run build --workspace=apps/frontend passed.
  • git diff --check passed.

@psatomas
psatomas merged commit 7f9fbf9 into main Oct 4, 2026
1 check passed
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.

1 participant