Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { FrameConnector } from '@web3-react/frame-connector'
import { AuthereumConnector } from '@web3-react/authereum-connector'
import { FortmaticConnector } from '@web3-react/fortmatic-connector'
import { PortisConnector } from '@web3-react/portis-connector'
import { SquarelinkConnector } from '@web3-react/squarelink-connector'
import { TorusConnector } from '@web3-react/torus-connector'
const POLLING_INTERVAL = 8000
const RPC_URLS: { [chainId: number]: string } = {
1: process.env.RPC_URL_1 as string,
4: process.env.RPC_URL_4 as string
}
export const injected = new InjectedConnector({ supportedChainIds: [1, 3, 4, 5, 42] })
export const network = new NetworkConnector({
urls: { 1: RPC_URLS[1], 4: RPC_URLS[4] },
defaultChainId: 1,
pollingInterval: POLLING_INTERVAL
})
export const walletconnect = new WalletConnectConnector({
rpc: { 1: RPC_URLS[1] },
bridge: 'https://bridge.walletconnect.org',
qrcode: true,
pollingInterval: POLLING_INTERVAL
})
export const walletlink = new WalletLinkConnector({
url: RPC_URLS[1],
appName: 'web3-react example'
})