reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.94k stars 1.41k forks source link

[bug] `multiInjectedProviderDiscovery` option not working after switching from Wallet Connect to Reown #3295

Open ErwanDecoster opened 22 hours ago

ErwanDecoster commented 22 hours ago

Link to minimal reproducible example

https://codesandbox.io/p/github/ErwanDecoster/Reown-multiInjectedProviderDiscovery-not-working-bug-reproduction/main

Summary

Title: multiInjectedProviderDiscovery option not working after switching from Wallet Connect to Reown


Description

After switching from Wallet Connect to Reown, the multiInjectedProviderDiscovery option in the WagmiAdapter is no longer taken into account.

Here’s the updated setup:

import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
import { createAppKit } from '@reown/appkit/react';

export const projectId = ""

const bellecour = {
  id: 0x86,
  name: 'iExec Sidechain',
  nativeCurrency: {
    decimals: 18,
    name: 'xRLC',
    symbol: 'xRLC',
  },
  rpcUrls: {
    public: { http: ['https://bellecour.iex.ec'] },
    default: { http: ['https://bellecour.iex.ec'] },
  },
  blockExplorers: {
    etherscan: {
      name: 'Blockscout',
      url: 'https://blockscout-bellecour.iex.ec',
    },
    default: { name: 'Blockscout', url: 'https://blockscout-bellecour.iex.ec' },
  },
};

export const wagmiAdapter = new WagmiAdapter({
  networks: [bellecour],
  multiInjectedProviderDiscovery: false,
  projectId,
});

createAppKit({
  adapters: [wagmiAdapter],
  networks: [bellecour],
  projectId,
  defaultNetwork: bellecour,
});

When using Wallet Connect, the multiInjectedProviderDiscovery option worked as expected. However, after transitioning to Reown, it seems to be ignored.


Expected Behavior

Actual Behavior


Environment


Steps to Reproduce

  1. Set up the WagmiAdapter as shown in the code above.
  2. Transition from Wallet Connect to Reown.
  3. Observe that the multiInjectedProviderDiscovery option no longer functions as expected.

Additional Context


Suggested Labels

Thank You

Thank you for your assistance! Please let me know if additional information is needed.

List of related npm package versions

@reown/appkit @reown/appkit-adapter-wagmi