2021-09-03 13:59:09 +00:00
|
|
|
import { setWeb3LibraryCallback } from "@instadapp/vue-web3";
|
2021-08-31 19:23:47 +00:00
|
|
|
import { InjectedConnector } from "@web3-react/injected-connector";
|
|
|
|
import { WalletConnectConnector } from "@web3-react/walletconnect-connector";
|
2021-09-02 22:19:19 +00:00
|
|
|
import { PortisConnector } from "@web3-react/portis-connector";
|
|
|
|
import { WalletLinkConnector } from "@web3-react/walletlink-connector";
|
|
|
|
|
|
|
|
import INSTADAPP_LOGO_URL from "~/assets/logo/instadapp-logo-icon.svg?inline";
|
2021-08-31 19:23:47 +00:00
|
|
|
|
|
|
|
import Web3 from "web3";
|
|
|
|
|
|
|
|
setWeb3LibraryCallback(provider => new Web3(provider));
|
|
|
|
|
|
|
|
export const injected = new InjectedConnector({
|
|
|
|
supportedChainIds: [1, 137]
|
|
|
|
});
|
|
|
|
|
|
|
|
export const walletconnect = new WalletConnectConnector({
|
|
|
|
rpc: {
|
|
|
|
1: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
|
|
|
|
137: "https://rpc-mainnet.maticvigil.com"
|
|
|
|
},
|
|
|
|
supportedChainIds: [1, 137]
|
|
|
|
});
|
2021-09-02 22:19:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
// mainnet only
|
|
|
|
export const portis = new PortisConnector({
|
2021-09-02 22:35:19 +00:00
|
|
|
dAppId: process.env.PORTIS_ID as string,
|
|
|
|
networks: [1],
|
2021-09-02 22:19:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export const walletlink = new WalletLinkConnector({
|
|
|
|
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
|
|
|
|
appName: "Instadapp",
|
|
|
|
appLogoUrl: INSTADAPP_LOGO_URL
|
|
|
|
});
|