yarn add @web3-react/injected-connector
supportedChainIds?: number[]
import { InjectedConnector } from '@web3-react/injected-connector'
const injected = new InjectedConnector({ supportedChainIds: [1, 3, 4, 5, 42] })
import { NoEthereumProviderError } from '@web3-react/injected-connector'
function Component () {
const { error } = useWeb3React()
const isNoEthereumProviderError = error instanceof NoEthereumProviderError
// ...
}
import { UserRejectedRequestError } from '@web3-react/injected-connector'
function Component () {
const { error } = useWeb3React()
const isUserRejectedRequestError = error instanceof UserRejectedRequestError
// ...
}