Skip to content

[Bug] Wallet connection conflicts when multiple wallet extensions installed #451

@giwaov

Description

@giwaov

Description

When users have multiple wallet extensions installed (e.g., MetaMask + Trust Wallet + Phantom), wallet connection can fail or connect to the wrong wallet due to provider conflicts.

Current Behavior

  1. Multiple wallets inject into window.ethereum
  2. Some wallets (like Trust Wallet) set isMetaMask: true even though they're not MetaMask
  3. Users selecting MetaMask may inadvertently connect to Trust Wallet
  4. Connection attempts may fail with unclear error messages

Expected Behavior

  • Each wallet should be correctly identified and isolated
  • Selecting a specific wallet should always connect to that wallet
  • Clear error messages when wallet conflicts occur

Related Issues

Current Mitigation

The WalletSelector.svelte component already implements:

  • EIP-6963 provider detection
  • Specific provider checks (isPhantom, isTrust, _metamask)
  • Conflict detection with user confirmation dialog

Suggested Improvements

  1. Improve EIP-6963 adoption: Prioritize wallets that announce via EIP-6963
  2. Better error messages: Show which wallet is causing conflicts
  3. Wallet priority settings: Let users set preferred wallet order
  4. Connection retry logic: Implement automatic retry with exponential backoff

Environment

  • Frontend: Svelte 5 with wagmi
  • Wallet detection: EIP-6963 + legacy window.ethereum

Code Location

frontend/src/components/WalletSelector.svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions