Skip to content

Commit

Permalink
Changed the name from Etheruem sepolia to mainnet on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-01k committed Oct 11, 2024
1 parent 87af83d commit 168729f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
4 changes: 3 additions & 1 deletion src/helpers/UtilityHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
40 changes: 26 additions & 14 deletions src/modules/createChannel/components/DifferentChainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Box
display='flex'
flexDirection='column'
padding='spacing-md'
backgroundColor='surface-secondary'
borderRadius='radius-sm'
width='-webkit-fill-available'
display="flex"
flexDirection="column"
padding="spacing-md"
backgroundColor="surface-secondary"
borderRadius="radius-sm"
width="-webkit-fill-available"
>
<Text textAlign='center' variant='h5-semibold' color='text-brand-medium'>
Please select Ethereum Sepolia Network in your Wallet to create a channel.
<Text
textAlign="center"
variant="h5-semibold"
color="text-brand-medium"
>
Please select {chainName} Network in your Wallet to create a channel.
</Text>

</Box>

<Box display='flex' justifyContent='center'>
<Button onClick={() => switchChain(appConfig.coreContractChain)}>
Change Network
</Button>
<Box
display="flex"
justifyContent="center"
>
<Button onClick={() => switchChain(appConfig.coreContractChain)}>Change Network</Button>
</Box>
</>
);
};

export { DifferentChainPage };
export { DifferentChainPage };

0 comments on commit 168729f

Please sign in to comment.