From f401d4ba59b7ac37dc68b40b089bef4ba0210265 Mon Sep 17 00:00:00 2001 From: "Ramon \"9Tails\" Canales" Date: Thu, 5 Sep 2024 16:01:26 +0100 Subject: [PATCH] feat(chore): allow network to have different currency --- data/networks.ts | 1 + data/wagmi.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/networks.ts b/data/networks.ts index 6a8bfd9da..d4833329d 100644 --- a/data/networks.ts +++ b/data/networks.ts @@ -31,6 +31,7 @@ export type ZkSyncNetwork = { l1Network?: L1Network; blockExplorerUrl?: string; blockExplorerApi?: string; + nativeCurrency?: { name: string; symbol: string; decimals: number }; displaySettings?: { showPartnerLinks?: boolean; }; diff --git a/data/wagmi.ts b/data/wagmi.ts index 777aabfec..c66081976 100644 --- a/data/wagmi.ts +++ b/data/wagmi.ts @@ -26,7 +26,7 @@ const formatZkSyncChain = (network: ZkSyncNetwork) => { id: network.id, name: network.name, network: network.key, - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, + nativeCurrency: network.nativeCurrency || { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [network.rpcUrl] }, public: { http: [network.rpcUrl] },