Skip to content

Commit

Permalink
fix: ENS resolution (#3219)
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan authored Feb 7, 2024
1 parent 9887d96 commit 14d9412
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/wallets/web3.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ChainInfo, RPC_AUTHENTICATION, type RpcUri } from '@safe-global/safe-gateway-typescript-sdk'
import { INFURA_TOKEN, SAFE_APPS_INFURA_TOKEN } from '@/config/constants'
import { JsonRpcProvider, BrowserProvider, type Eip1193Provider, type Provider, Network } from 'ethers'
import { JsonRpcProvider, BrowserProvider, type Eip1193Provider, type Provider } from 'ethers'
import ExternalStore from '@/services/ExternalStore'
import { EMPTY_DATA } from '@safe-global/protocol-kit/dist/src/utils/constants'

Expand All @@ -23,7 +23,7 @@ export const getRpcServiceUrl = (rpcUri: RpcUri): string => {
export const createWeb3ReadOnly = (chain: ChainInfo, customRpc?: string): JsonRpcProvider | undefined => {
const url = customRpc || getRpcServiceUrl(chain.rpcUri)
if (!url) return
return new JsonRpcProvider(url, new Network(chain.chainName, chain.chainId), {
return new JsonRpcProvider(url, undefined, {
staticNetwork: true,
})
}
Expand All @@ -35,7 +35,7 @@ export const createWeb3 = (walletProvider: Eip1193Provider): BrowserProvider =>
export const createSafeAppsWeb3Provider = (chain: ChainInfo, customRpc?: string): JsonRpcProvider | undefined => {
const url = customRpc || formatRpcServiceUrl(chain.rpcUri, SAFE_APPS_INFURA_TOKEN)
if (!url) return
return new JsonRpcProvider(url, new Network(chain.chainName, chain.chainId), {
return new JsonRpcProvider(url, undefined, {
staticNetwork: true,
})
}
Expand Down

0 comments on commit 14d9412

Please sign in to comment.