Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ENS resolution #3219

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading