generated from mirshko/next-web3-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnectors.ts
31 lines (23 loc) · 1.08 KB
/
connectors.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { InjectedConnector } from "@web3-react/injected-connector";
import { NetworkConnector } from '@web3-react/network-connector'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
import { WalletLinkConnector } from '@web3-react/walletlink-connector'
// TODO: swap the urls/rpc endpoints for variable ones
const eth_net= ["mainnet", "ropsten", "kovan","rinkeby","goerli"]
export const injected = new InjectedConnector({
supportedChainIds: [parseInt(process.env.NEXT_PUBLIC_NETWORK_ID)],
});
export const network = new NetworkConnector({
urls: { 1: "https://mainnet.infura.io/v3/91da3a52af254c758fa6fe292fa7f9fd"},
defaultChainId: parseInt(process.env.NEXT_PUBLIC_NETWORK_ID)
})
export const walletconnect = new WalletConnectConnector({
rpc: { 1: "https://mainnet.infura.io/v3/91da3a52af254c758fa6fe292fa7f9fd"},
bridge: 'https://bridge.walletconnect.org',
qrcode: true,
pollingInterval: 1000
})
export const walletlink = new WalletLinkConnector({
url: "https://mainnet.infura.io/v3/91da3a52af254c758fa6fe292fa7f9fd",
appName: 'web3-react example'
})