Skip to content

Commit

Permalink
Changed the name from Etheruem sepolia to mainnet on prod (#1918)
Browse files Browse the repository at this point in the history
* Changed the name from Etheruem sepolia to mainnet on prod

* REmoved the log
  • Loading branch information
abhishek-01k authored Oct 11, 2024
1 parent 87af83d commit 0ff4e61
Show file tree
Hide file tree
Showing 2 changed files with 27 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
38 changes: 24 additions & 14 deletions src/modules/createChannel/components/DifferentChainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,42 @@ 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];

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 0ff4e61

Please sign in to comment.