From d5e75483bd67696c302c0b994761c2562f159b57 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 16 Oct 2024 12:00:32 +0200 Subject: [PATCH] fix: remove chain from query key (#1993) --- .../src/hooks/useAccountIsBlocked.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/arb-token-bridge-ui/src/hooks/useAccountIsBlocked.ts b/packages/arb-token-bridge-ui/src/hooks/useAccountIsBlocked.ts index d77dd84e70..d93791cfc4 100644 --- a/packages/arb-token-bridge-ui/src/hooks/useAccountIsBlocked.ts +++ b/packages/arb-token-bridge-ui/src/hooks/useAccountIsBlocked.ts @@ -1,10 +1,9 @@ import { useMemo } from 'react' -import { useAccount, useNetwork } from 'wagmi' +import { useAccount } from 'wagmi' import useSWRImmutable from 'swr/immutable' import { ApiResponseSuccess } from '../pages/api/screenings' import { trackEvent } from '../util/AnalyticsUtils' -import { isNetwork } from '../util/networks' import { Address } from '../util/AddressUtils' async function isBlocked(address: Address): Promise { @@ -40,7 +39,6 @@ async function fetcher(address: Address): Promise { export function useAccountIsBlocked() { const { address } = useAccount() - const { chain } = useNetwork() const queryKey = useMemo(() => { if (typeof address === 'undefined') { @@ -48,13 +46,8 @@ export function useAccountIsBlocked() { return null } - if (isNetwork(chain?.id ?? 0).isTestnet) { - // Don't fetch - return null - } - return [address.toLowerCase(), 'useAccountIsBlocked'] - }, [address, chain?.id]) + }, [address]) const { data: isBlocked } = useSWRImmutable( queryKey,