Uniswap / web3-react

A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps
https://web3-react-mu.vercel.app/
GNU General Public License v3.0
5.56k stars 1.52k forks source link

How can i connect okx wallet (web3-react v6) ?? #926

Closed lxiiiixi closed 6 months ago

lxiiiixi commented 7 months ago

I am still using web3-reactv6, and I want to use both MetaMask and OKX wallets in my Dapp. However, I am using the Injected connector for both, so I am currently unable to distinguish between them. How can I implement a way to differentiate the calls to these two wallets?

export const SUPPORTED_WALLETS: { [key: string]: WalletInfo } = {
  INJECTED: {
    connector: injected,
    name: 'Injected',
    iconName: 'arrow-right.svg',
    description: 'Injected web3 provider.',
    href: null,
    color: '#010101',
    primary: true,
  },
  METAMASK: {
    connector: injected,
    name: 'MetaMask',
    iconName: 'metamask.png',
    description: 'Easy-to-use browser extension.',
    href: null,
    color: '#E8831D',
  },
  OKEX: {
    connector: injected,
    name: 'Okex',
    iconName: 'okex.svg',
    description: 'Easy-to-use browser extension.',
    href: null,
    color: '#E8831D',
  }
}