From 4601acb9c8a66c9444407429cc157a50287e2993 Mon Sep 17 00:00:00 2001 From: Leon Talbert Date: Thu, 28 Nov 2024 18:17:20 +0800 Subject: [PATCH] Remove goerli properly --- .../pages/profile/[name]/registration/Registration.tsx | 5 ----- src/constants/chains.ts | 5 +---- src/hooks/useEthPrice.ts | 9 ++------- src/utils/query/wagmi.ts | 4 +--- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/components/pages/profile/[name]/registration/Registration.tsx b/src/components/pages/profile/[name]/registration/Registration.tsx index 48ce3df24..3294b044d 100644 --- a/src/components/pages/profile/[name]/registration/Registration.tsx +++ b/src/components/pages/profile/[name]/registration/Registration.tsx @@ -359,11 +359,6 @@ const Registration = ({ nameDetails, isLoading }: Props) => { {t('steps.info.moonpayModalHeader')} - {chainId === 5 && ( - - {`${t('steps.info.moonpayTestCard')}: 4000 0209 5159 5032, 12/2030, 123`} - - )} export type SupportedChain = | typeof mainnetWithEns - | typeof goerliWithEns | typeof sepoliaWithEns | typeof holeskyWithEns | typeof localhostWithEns diff --git a/src/hooks/useEthPrice.ts b/src/hooks/useEthPrice.ts index 4fd8cef70..1861ed2a2 100644 --- a/src/hooks/useEthPrice.ts +++ b/src/hooks/useEthPrice.ts @@ -1,21 +1,16 @@ import { Address } from 'viem' -import { useChainId, useReadContract } from 'wagmi' -import { goerli } from 'wagmi/chains' +import { useReadContract } from 'wagmi' import { useAddressRecord } from './ensjs/public/useAddressRecord' const ORACLE_ENS = 'eth-usd.data.eth' -const ORACLE_GOERLI = '0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e' as const export const useEthPrice = () => { - const chainId = useChainId() - const { data: address_ } = useAddressRecord({ name: ORACLE_ENS, - enabled: chainId !== goerli.id, }) - const address = chainId === 5 ? ORACLE_GOERLI : (address_?.value as Address) || undefined + const address = (address_?.value as Address) || undefined return useReadContract({ abi: [ diff --git a/src/utils/query/wagmi.ts b/src/utils/query/wagmi.ts index 0794e847b..31e44228f 100644 --- a/src/utils/query/wagmi.ts +++ b/src/utils/query/wagmi.ts @@ -5,7 +5,6 @@ import { holesky, localhost, mainnet, sepolia } from 'wagmi/chains' import { ccipRequest } from '@ensdomains/ensjs/utils' import { - goerliWithEns, holeskyWithEns, localhostWithEns, mainnetWithEns, @@ -33,7 +32,7 @@ const drpcUrl = (chainName: string) => chainName === 'mainnet' ? 'ethereum' : chainName }&dkey=${drpcKey}` -type SupportedUrlFunc = typeof infuraUrl | typeof dRPCUrl | typeof tenderlyUrl +type SupportedUrlFunc = typeof infuraUrl | typeof drpcUrl | typeof tenderlyUrl const initialiseTransports = ( chainName: string, @@ -87,7 +86,6 @@ const localStorageWithInvertMiddleware = (): Storage | undefined => { const chains = [ ...(isLocalProvider ? ([localhostWithEns] as const) : ([] as const)), mainnetWithEns, - goerliWithEns, sepoliaWithEns, holeskyWithEns, ] as const