diff --git a/app.config.js b/app.config.js index 359f6018e..de7b87f30 100644 --- a/app.config.js +++ b/app.config.js @@ -1,4 +1,8 @@ module.exports = { + // The default network and its associated config the app should connect to + // on start. App will automatically switch network configs when user switches + // networks in their wallet. + // Ocean Protocol contracts are deployed for: 'mainnet', 'rinkeby', 'development' network: process.env.GATSBY_NETWORK || 'rinkeby', infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx', // The ETH address the marketplace fee will be sent to. diff --git a/src/components/molecules/Wallet/Account.tsx b/src/components/molecules/Wallet/Account.tsx index fa66a4c38..4231b5a25 100644 --- a/src/components/molecules/Wallet/Account.tsx +++ b/src/components/molecules/Wallet/Account.tsx @@ -2,7 +2,7 @@ import { useOcean } from '@oceanprotocol/react' import { toDataUrl } from 'ethereum-blockies' import React, { FormEvent } from 'react' import { ReactComponent as Caret } from '../../../images/caret.svg' -import { accountTruncate, isCorrectNetwork } from '../../../utils/wallet' +import { accountTruncate } from '../../../utils/wallet' import Status from '../../atoms/Status' import styles from './Account.module.css' @@ -24,7 +24,7 @@ const Blockies = ({ account }: { account: string | undefined }) => { // eslint-disable-next-line const Account = React.forwardRef((props, ref: any) => { const { accountId, status, connect, networkId } = useOcean() - const hasSuccess = status === 1 && isCorrectNetwork(networkId) + const hasSuccess = status === 1 && networkId === 1 async function handleActivation(e: FormEvent) { // prevent accidentially submitting a form the button might be in diff --git a/src/components/molecules/Wallet/Details.module.css b/src/components/molecules/Wallet/Details.module.css index bd413da08..a80d30bfe 100644 --- a/src/components/molecules/Wallet/Details.module.css +++ b/src/components/molecules/Wallet/Details.module.css @@ -1,5 +1,6 @@ .details { padding: calc(var(--spacer) / 4); + min-width: 17rem; } .details > section[class*='feedback'] { diff --git a/src/components/molecules/Wallet/Details.tsx b/src/components/molecules/Wallet/Details.tsx index 3c42d01c2..a84a9dca9 100644 --- a/src/components/molecules/Wallet/Details.tsx +++ b/src/components/molecules/Wallet/Details.tsx @@ -3,14 +3,13 @@ import Button from '../../atoms/Button' import styles from './Details.module.css' import { useOcean } from '@oceanprotocol/react' import Web3Feedback from './Feedback' -import { getNetworkName } from '../../../utils/wallet' import { getInjectedProviderName } from 'web3modal' import Conversion from '../../atoms/Price/Conversion' import { formatCurrency } from '@coingecko/cryptoformat' import { useUserPreferences } from '../../../providers/UserPreferences' export default function Details(): ReactElement { - const { balance, connect, logout, networkId } = useOcean() + const { balance, connect, logout } = useOcean() const { locale } = useUserPreferences() return ( @@ -27,11 +26,7 @@ export default function Details(): ReactElement { ))}
  • - - {getInjectedProviderName()} -
    - {getNetworkName(networkId)} -
    + {getInjectedProviderName()}