mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-16 02:04:54 +01:00
fix network name enforcement
This commit is contained in:
parent
c2dd8448cf
commit
7119014b08
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user