diff --git a/src/helpers/UtilityHelper.ts b/src/helpers/UtilityHelper.ts index bc8910e049..4e75a97015 100644 --- a/src/helpers/UtilityHelper.ts +++ b/src/helpers/UtilityHelper.ts @@ -113,7 +113,9 @@ export const EnvHelper = { }, }; -export const networkName = { +export const networkName: { + [key: number]: string; +} = { 42: 'Ethereum Kovan', 5: 'Ethereum Goerli', 11155111: 'Ethereum Sepolia', diff --git a/src/modules/createChannel/components/DifferentChainPage.tsx b/src/modules/createChannel/components/DifferentChainPage.tsx index 78dc030e24..53d084cab5 100644 --- a/src/modules/createChannel/components/DifferentChainPage.tsx +++ b/src/modules/createChannel/components/DifferentChainPage.tsx @@ -6,32 +6,44 @@ import { appConfig } from 'config'; // Components import { Box, Button, Text } from 'blocks'; +import { networkName } from 'helpers/UtilityHelper'; const DifferentChainPage = () => { const { switchChain } = useAccount(); + + const chainId = appConfig.allowedNetworks[0]; + + const chainName = networkName[chainId]; + + console.log('Chain name', chainName, chainId); + return ( <> - - Please select Ethereum Sepolia Network in your Wallet to create a channel. + + Please select {chainName} Network in your Wallet to create a channel. - - - + + ); }; -export { DifferentChainPage }; \ No newline at end of file +export { DifferentChainPage };