import { Connector } from '../types' ; import { ConnectionRejectedError } from '../errors' ; export default async function init ( ) { const { InjectedConnector , UserRejectedRequestError } = await import ( '@web3-react/injected-connector' ) ; return { web3ReactConnector ( { chainId } ) { return new InjectedConnector ( { supportedChainIds : chainId } ) ; } , handleActivationError ( err ) { return err instanceof UserRejectedRequestError ? new ConnectionRejectedError ( ) : null ; } } ; }