From 5926de2b76c7e2fc79ba6dcb5d820c9d331f7e9c Mon Sep 17 00:00:00 2001 From: songwongtp <16089160+songwongtp@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:55:55 +0700 Subject: [PATCH] fix: default chain config --- src/lib/app-provider/contexts/app.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/app-provider/contexts/app.tsx b/src/lib/app-provider/contexts/app.tsx index 5410e4968..33ed75c37 100644 --- a/src/lib/app-provider/contexts/app.tsx +++ b/src/lib/app-provider/contexts/app.tsx @@ -17,11 +17,7 @@ import type { ProjectConstants } from "config/project"; import { PROJECT_CONSTANTS } from "config/project"; import { FALLBACK_THEME, getTheme } from "config/theme"; import type { ThemeConfig } from "config/theme/types"; -import { - FALLBACK_SUPPORTED_CHAIN_ID, - HASURA_ADMIN_SECRET, - SUPPORTED_CHAIN_IDS, -} from "env"; +import { HASURA_ADMIN_SECRET, SUPPORTED_CHAIN_IDS } from "env"; import { changeFavicon } from "lib/utils"; import { DEFAULT_CHAIN_CONFIG } from "./default"; @@ -44,7 +40,7 @@ interface AppContextInterface { const DEFAULT_STATES: AppContextInterface = { isHydrated: false, availableChainIds: SUPPORTED_CHAIN_IDS, - currentChainId: FALLBACK_SUPPORTED_CHAIN_ID, + currentChainId: "", chainConfig: DEFAULT_CHAIN_CONFIG, indexerGraphClient: new GraphQLClient(DEFAULT_CHAIN_CONFIG.graphql ?? "", { headers: { @@ -72,6 +68,7 @@ export const AppProvider = observer(({ children }: AppProviderProps) => { if (!chainConfig) { setStates({ ...DEFAULT_STATES, + currentChainId: newChainId, isHydrated: true, });