Skip to content

Commit

Permalink
fix: default chain config
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Aug 30, 2024
1 parent 8c58893 commit 5926de2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib/app-provider/contexts/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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: {
Expand Down Expand Up @@ -72,6 +68,7 @@ export const AppProvider = observer(({ children }: AppProviderProps) => {
if (!chainConfig) {
setStates({
...DEFAULT_STATES,
currentChainId: newChainId,
isHydrated: true,
});

Expand Down

0 comments on commit 5926de2

Please sign in to comment.