@web3-react/portis-connector#PortisConnector JavaScript Examples

The following examples show how to use @web3-react/portis-connector#PortisConnector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: logic.js    From lrc-staking-dapp with MIT License 8 votes vote down vote up
tryToOpenWalletIfNotActive = (active, walletID, onActivate, onSetWalletID) => {
  if (!active) {
    switch (walletID) {
      case 1: // Read-only
        onActivate(new NetworkConnector({ urls: { 1: 'https://mainnet.infura.io/v3/740f8a307aa34141a298506577f063bc' } }))
          .catch(() => onSetWalletID(0));
        break;
      case 2: // Metamask
        onActivate(new InjectedConnector({ supportedChainIds: [1, 3, 4, 5, 42] }))
          .catch(() => onSetWalletID(0));
        break;
      case 3:
        onActivate(new LedgerConnector({ chainId: 1, url: 'https://mainnet.infura.io/v3/740f8a307aa34141a298506577f063bc' }))
          .catch(() => onSetWalletID(0));
        break;
      case 4:
        onActivate(new TrezorConnector({
          chainId: 1,
          manifestAppUrl: 'https://stake.o2b.dev',
          manifestEmail: '[email protected]',
          url: 'https://mainnet.infura.io/v3/740f8a307aa34141a298506577f063bc',
        }))
          .catch(() => onSetWalletID(0));
        break;
      case 5:
        onActivate(new WalletConnectConnector({ rpc: { 1: 'https://mainnet.infura.io/v3/740f8a307aa34141a298506577f063bc' } }))
          .catch(() => onSetWalletID(0));
        break;
      case 6:
        onActivate(new AuthereumConnector({ chainId: 1 }))
          .catch(() => onSetWalletID(0));
        break;
      case 7:
        onActivate(new FortmaticConnector({ apiKey: 'pk_live_01129497FC783931', chainId: 1 }))
          .catch(() => onSetWalletID(0));
        break;
      case 8:
        onActivate(new PortisConnector({ dAppId: '0e834d4c-cea9-4770-9c52-679fe5580bad', networks: [1] }))
          .catch(() => onSetWalletID(0));
        break;
      case 9:
        onActivate(new SquarelinkConnector({ clientId: '', networks: [1] }))
          .catch(() => onSetWalletID(0));
        break;
      case 10:
        onActivate(new TorusConnector({ chainId: 1 }))
          .catch(() => onSetWalletID(0));
        break;
      default: // No wallet
        onSetWalletID(0);
        break;
    }
  }
}
Example #2
Source File: index.js    From uniswap-v1-frontend with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: process.env.REACT_APP_PORTIS_ID,
  networks: [1]
})
Example #3
Source File: connectors.jsx    From crv.finance with MIT License 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: "5dea304b-33ed-48bd-8f00-0076a2546b60",
  networks: [1, 100]
})
Example #4
Source File: connectors.js    From vote-incentives with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: "5dea304b-33ed-48bd-8f00-0076a2546b60",
  networks: [1, 100]
})
Example #5
Source File: index.js    From sorbet-finance with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: PORTIS_ID ? PORTIS_ID : '',
  networks: [1],
})
Example #6
Source File: index.js    From swap-frontend with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: process.env.REACT_APP_PORTIS_ID,
  networks: [1]
})
Example #7
Source File: index.js    From pine-interface with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: PORTIS_ID ? PORTIS_ID : '',
  networks: [1]
})
Example #8
Source File: index.js    From Smart-Swap-Protocol with GNU General Public License v3.0 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: 'ad1d9de5-18e7-48ab-bcbf-a9929dc6d9cb',
  networks: [15001]
})
Example #9
Source File: connectors.jsx    From ileverage-finance with MIT License 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: "211b48db-e8cc-4b68-82ad-bf781727ea9e",
  networks: [1, 100]
})
Example #10
Source File: connectors.jsx    From iliquidate-finance with MIT License 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: "211b48db-e8cc-4b68-82ad-bf781727ea9e",
  networks: [1, 100]
})
Example #11
Source File: connectors.jsx    From ycredit-finance with MIT License 5 votes vote down vote up
portis = new PortisConnector({
  dAppId: "5dea304b-33ed-48bd-8f00-0076a2546b60",
  networks: [1, 100]
})
Example #12
Source File: connectors.jsx    From ygov-finance with MIT License 4 votes vote down vote up
portis = new PortisConnector({
  dAppId: "790d2f80-46b8-4475-baa8-d53a7efad388",
  networks: [1, 100]
})