From 19588e46786cef5b910c547b1af3506c95dda2f3 Mon Sep 17 00:00:00 2001 From: Arjen Chen <152835471+rlverside@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:11:39 +0800 Subject: [PATCH] fix(faucet): change rpcUrls logic on goerli and sepolia for faucet page (#225) * feat(faucet): switch network to sepolia * fix(faucet): change rpcUrls logic on goerli and sepolia * fix: fix mnt symbol on sepolia --------- Co-authored-by: shellteo --- apps/faucet/src/components/AddTokenBtn.tsx | 2 +- apps/faucet/src/config/constants.ts | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/apps/faucet/src/components/AddTokenBtn.tsx b/apps/faucet/src/components/AddTokenBtn.tsx index d9f53cd2..6619e4e8 100644 --- a/apps/faucet/src/components/AddTokenBtn.tsx +++ b/apps/faucet/src/components/AddTokenBtn.tsx @@ -90,7 +90,7 @@ export default function AddTokenBtn({ setEffect(true); addToken({ address: NETWORKS[L1_CHAIN_ID], - symbol: "MNT", + symbol: "SepoliaMNT", decimals: 18, image: "https://token-list.mantle.xyz/data/Mantle/logo.svg", }); diff --git a/apps/faucet/src/config/constants.ts b/apps/faucet/src/config/constants.ts index bf19fedf..53de536a 100644 --- a/apps/faucet/src/config/constants.ts +++ b/apps/faucet/src/config/constants.ts @@ -84,12 +84,7 @@ export const CHAINS: Record< symbol: "GoerliETH", decimals: 18, }, - rpcUrls: [ - // infura backed redirect gateway - `${ABSOLUTE_PATH}/rpc`, - // public gateway - `https://rpc.ankr.com/eth_goerli`, - ], + rpcUrls: [process.env.NEXT_PUBLIC_GOERLI_RPC_URL || `${ABSOLUTE_PATH}/rpc`], blockExplorerUrls: ["https://goerli.etherscan.io/"], }, 11155111: { @@ -101,10 +96,7 @@ export const CHAINS: Record< decimals: 18, }, rpcUrls: [ - // infura backed redirect gateway - `${ABSOLUTE_PATH}/rpc`, - // public gateway - `https://rpc.ankr.com/eth_sepolia`, + process.env.NEXT_PUBLIC_SEPOLIA_RPC_URL || `${ABSOLUTE_PATH}/rpc`, ], blockExplorerUrls: ["https://sepolia.etherscan.io/"], }, @@ -121,7 +113,7 @@ export const CHAINS_FORMATTED: Record = { http: [CHAINS[5].rpcUrls[0]], }, public: { - http: [CHAINS[5].rpcUrls[1]], + http: [CHAINS[5].rpcUrls[0]], }, }, id: 5, @@ -136,7 +128,7 @@ export const CHAINS_FORMATTED: Record = { http: [CHAINS[11155111].rpcUrls[0]], }, public: { - http: [CHAINS[11155111].rpcUrls[1]], + http: [CHAINS[11155111].rpcUrls[0]], }, }, id: 11155111,