Skip to content

Commit

Permalink
fix: use defined L1 network for hyperchain (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeexcoin authored Nov 22, 2024
1 parent e2a39d5 commit 11db697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/networks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mainnet, sepolia } from "@wagmi/core/chains";

import Hyperchains from "@/hyperchains/config.json";
import { PUBLIC_L1_CHAINS, type Config } from "@/scripts/hyperchains/common";
import { type Config } from "@/scripts/hyperchains/common";

import type { Token } from "@/types";
import type { Chain } from "@wagmi/core/chains";
Expand Down Expand Up @@ -127,7 +127,7 @@ const getHyperchains = (): ZkSyncNetwork[] => {
getTokens: () => e.tokens,
};
if (e.network.publicL1NetworkId) {
network.l1Network = PUBLIC_L1_CHAINS.find((chain) => chain.id === e.network.publicL1NetworkId);
network.l1Network = Object.entries(l1Networks).find(([, chain]) => chain.id === e.network.publicL1NetworkId)?.[1];
if (!network.l1Network) {
throw new Error(
`L1 network with ID ${e.network.publicL1NetworkId} from ${network.name} config wasn't found in the list of public L1 networks.`
Expand Down

0 comments on commit 11db697

Please sign in to comment.