diff --git a/src/special/London.tsx b/src/special/London.tsx index 77b48cc..65e7ba4 100644 --- a/src/special/London.tsx +++ b/src/special/London.tsx @@ -3,22 +3,29 @@ import { useLatestBlock } from "../useLatestBlock"; import { RuntimeContext } from "../useRuntime"; import Countdown from "./Countdown"; -const londonBlockNumber = 12965000; +const londonBlockNumber: { [chainId: string]: number } = { + "1": 12965000, + "3": 10499401, + "4": 8897988, + "5": 5062605, +}; const London: React.FC = () => { const { provider } = useContext(RuntimeContext); const block = useLatestBlock(provider); - if (!block) { + if (!provider || !block) { return <>; } // Display countdown - if (provider && block.number < londonBlockNumber) { + const targetBlockNumber = + londonBlockNumber[provider.network.chainId.toString()]; + if (block.number < targetBlockNumber) { return ( ); }