diff --git a/apps/multisig-signer/src/app/components/web3-connector/web3-connector.tsx b/apps/multisig-signer/src/app/components/web3-connector/web3-connector.tsx index 7e71b0d54..d02e3ead1 100644 --- a/apps/multisig-signer/src/app/components/web3-connector/web3-connector.tsx +++ b/apps/multisig-signer/src/app/components/web3-connector/web3-connector.tsx @@ -1,5 +1,5 @@ import { useEnvironment } from '@vegaprotocol/environment'; -import { useEthereumConfig } from '@vegaprotocol/web3'; +import { getChainName, useEthereumConfig } from '@vegaprotocol/web3'; import { Button, Splash, AsyncRenderer } from '@vegaprotocol/ui-toolkit'; import { Web3ConnectDialog } from '@vegaprotocol/web3'; import { useWeb3React } from '@web3-react/core'; @@ -82,7 +82,7 @@ export const Web3Content = ({

- This app only works on chain ID: {appChainId} + This app only works on {getChainName(appChainId)}

diff --git a/apps/token/src/components/web3-connector/web3-connector.tsx b/apps/token/src/components/web3-connector/web3-connector.tsx index 8d1bd2321..9a8f60a99 100644 --- a/apps/token/src/components/web3-connector/web3-connector.tsx +++ b/apps/token/src/components/web3-connector/web3-connector.tsx @@ -1,5 +1,5 @@ import { Button, Splash } from '@vegaprotocol/ui-toolkit'; -import { Web3ConnectDialog } from '@vegaprotocol/web3'; +import { getChainName, Web3ConnectDialog } from '@vegaprotocol/web3'; import { useWeb3React } from '@web3-react/core'; import type { ReactElement } from 'react'; import { useCallback, useEffect } from 'react'; @@ -78,7 +78,7 @@ export const Web3Content = ({ children, appChainId }: Web3ContentProps) => {

- This app only works on chain ID: {appChainId} + This app only works on {getChainName(appChainId)}

diff --git a/libs/deposits/src/lib/deposit-form.tsx b/libs/deposits/src/lib/deposit-form.tsx index aee2a66b8..8ed50201b 100644 --- a/libs/deposits/src/lib/deposit-form.tsx +++ b/libs/deposits/src/lib/deposit-form.tsx @@ -29,7 +29,7 @@ import { useAssetDetailsDialogStore } from '@vegaprotocol/assets'; import { ETHEREUM_EAGER_CONNECT, useWeb3ConnectStore, - ChainIdMap, + getChainName, } from '@vegaprotocol/web3'; interface FormFields { @@ -323,7 +323,7 @@ const FormButton = ({ ); } else if (chainId !== desiredChainId) { console.log(chainId, desiredChainId); - const chainName = desiredChainId ? ChainIdMap[desiredChainId] : 'Unknown'; + const chainName = getChainName(desiredChainId); message = t(`This app only works on ${chainName}.`); button = (