From a322c443ede26aad2fbb8678779eccbe9ef6298d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 2 Oct 2020 14:07:17 +0200 Subject: [PATCH] network change fix --- src/components/molecules/Wallet/Account.tsx | 1 - src/helpers/NetworkMonitor.tsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/Wallet/Account.tsx b/src/components/molecules/Wallet/Account.tsx index 39928f0cf..fa66a4c38 100644 --- a/src/components/molecules/Wallet/Account.tsx +++ b/src/components/molecules/Wallet/Account.tsx @@ -25,7 +25,6 @@ const Blockies = ({ account }: { account: string | undefined }) => { const Account = React.forwardRef((props, ref: any) => { const { accountId, status, connect, networkId } = useOcean() const hasSuccess = status === 1 && isCorrectNetwork(networkId) - console.log(networkId) async function handleActivation(e: FormEvent) { // prevent accidentially submitting a form the button might be in diff --git a/src/helpers/NetworkMonitor.tsx b/src/helpers/NetworkMonitor.tsx index 3dd6a8a2a..dda5410cc 100644 --- a/src/helpers/NetworkMonitor.tsx +++ b/src/helpers/NetworkMonitor.tsx @@ -8,8 +8,8 @@ export function NetworkMonitor(): ReactElement { useEffect(() => { if (!web3Provider) return - async function handleNetworkChanged(chainId: number) { - const config = getOceanConfig(chainId) + async function handleNetworkChanged(chainId: string) { + const config = getOceanConfig(Number(chainId.replace('0x', ''))) await connect(config) }