Skip to content

Commit

Permalink
fix: remove infura dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
berteotti committed Nov 7, 2023
1 parent b3347db commit 9637a4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const [network, networkHooks] = initializeConnector<Network>(
new Network({
actions,
urlMap: {
[ChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
[ChainId.MAINNET]: `https://rpc.mevblocker.io/`,
[ChainId.XDAI]: 'https://rpc.gnosischain.com/',
[ChainId.ARBITRUM_ONE]: 'https://arb1.arbitrum.io/rpc',
[ChainId.POLYGON]: 'https://polygon-rpc.com/',
Expand Down Expand Up @@ -51,7 +51,7 @@ export const [walletConnect, walletConnectHooks] = initializeConnector<WalletCon
ChainId.ZK_SYNC_ERA_TESTNET,
],
rpcMap: {
[ChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
[ChainId.MAINNET]: `https://rpc.mevblocker.io/`,
[ChainId.XDAI]: 'https://rpc.gnosischain.com/',
[ChainId.ARBITRUM_ONE]: 'https://arb1.arbitrum.io/rpc',
[ChainId.POLYGON]: 'https://polygon-rpc.com/',
Expand Down Expand Up @@ -79,7 +79,7 @@ export const [coinbaseWallet, coinbaseWalletHooks] = initializeConnector<Coinbas
new CoinbaseWallet({
actions,
options: {
url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
url: `https://rpc.mevblocker.io/`,
appName: 'web3-react',
},
})
Expand Down
4 changes: 1 addition & 3 deletions src/hooks/useGasInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { ChainId } from '@swapr/sdk'

import { useEffect, useState } from 'react'

import { INFURA_PROJECT_ID } from '../connectors'

import { useActiveWeb3React } from './index'

interface ChainGasInfo {
Expand Down Expand Up @@ -32,7 +30,7 @@ const gasInfoChainUrls: ChainGasInfo = {
keys: ['ProposeGasPrice', 'FastGasPrice', 'SafeGasPrice'],
},
[ChainId.ARBITRUM_ONE]: {
url: `https://arbitrum-mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
url: `https://arb1.arbitrum.io/rpc`,
requestConfig: {
method: 'POST',
headers: {
Expand Down

0 comments on commit 9637a4f

Please sign in to comment.