From 7119014b088447791d09081db41a0af177b7f3b3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 30 Jul 2020 10:16:47 +0200 Subject: [PATCH] fix network name enforcement --- src/components/molecules/Wallet/Feedback.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/Wallet/Feedback.tsx b/src/components/molecules/Wallet/Feedback.tsx index 53b329058..f139ccdf8 100644 --- a/src/components/molecules/Wallet/Feedback.tsx +++ b/src/components/molecules/Wallet/Feedback.tsx @@ -2,7 +2,7 @@ import React, { ReactElement } from 'react' import Status from '../../atoms/Status' import styles from './Feedback.module.css' import { useOcean } from '@oceanprotocol/react' -import { isCorrectNetwork, getNetworkName } from '../../../utils/wallet' +import { isCorrectNetwork } from '../../../utils/wallet' import { useSiteMetadata } from '../../../hooks/useSiteMetadata' export declare type Web3Error = { @@ -21,7 +21,9 @@ export default function Web3Feedback({ const isOceanConnectionError = status === -1 const correctNetwork = isCorrectNetwork(chainId) const showFeedback = !account || isOceanConnectionError || !correctNetwork - const networkName = getNetworkName(appConfig.network) + const networkName = appConfig.network.replace(/^\w/, (c: string) => + c.toUpperCase() + ) const state = !account ? 'error'