Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Duplicate Wallet Entry for Injected Connector #430

Open
benefacto opened this issue Nov 12, 2024 · 0 comments
Open

[BUG] Duplicate Wallet Entry for Injected Connector #430

benefacto opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@benefacto
Copy link

Describe the bug

When configuring an injected connector according to the docs: https://docs.family.co/connectkit/wallets#configure-wallets-example to modify the list of suggested wallets, a duplicate entry appears in the modal if the wallet’s browser extension (e.g., Bitget Wallet) is detected. This duplication does not occur when the extension is not present.

To reproduce

  • Code Example:

    export const wagmiConfig = createConfig({
      ...ckConfig,
      connectors: [
        injected({
          target: () => ({
            id: 'BitgetWallet',
            name: 'Bitget Wallet',
            provider: window.bitkeep?.ethereum,
            icon: 'favicons/bitget-32.png',
          }),
        }),
        ...(ckConfig.connectors ?? []),
      ],
    });
  • Steps to Reproduce:

    1. Configure ConnectKit with the above wagmiConfig.
    2. Open the ConnectKit modal with the Bitget Wallet browser extension installed and enabled.

Expected behavior

Only one entry per wallet should appear in the ConnectKit modal, even if a browser extension for that wallet is detected.

Screenshots

When the Bitget Wallet extension is enabled:
image

When the extension is disabled:
image

Environment details

  • ConnectKit version: 1.8.2
  • Browser: Chromium Version 130.0.6723.116 (Official Build) Arch Linux (64-bit)
  • OS: 5.15.167-1-MANJARO

Additional context

After reviewing the wagmi configuration options, there doesn’t appear to be a straightforward way to filter connectors to ensure a single button per wallet instance in the modal.

@benefacto benefacto added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant