diff --git a/src/components/molecules/Wallet/Account.tsx b/src/components/molecules/Wallet/Account.tsx index 8f706e81d..51f2c00c5 100644 --- a/src/components/molecules/Wallet/Account.tsx +++ b/src/components/molecules/Wallet/Account.tsx @@ -1,10 +1,10 @@ -import React, { FormEvent } from 'react' -import styles from './Account.module.css' import { useOcean } from '@oceanprotocol/react' import { toDataUrl } from 'ethereum-blockies' +import React, { FormEvent } from 'react' import { ReactComponent as Caret } from '../../../images/caret.svg' -import Status from '../../atoms/Status' import { accountTruncate, isCorrectNetwork } from '../../../utils/wallet' +import Status from '../../atoms/Status' +import styles from './Account.module.css' const Blockies = ({ account }: { account: string | undefined }) => { if (!account) return null @@ -32,13 +32,17 @@ const Account = React.forwardRef((props, ref: any) => { await connect() } + // prevent accidentially submitting a form the button might be in + function handleButton(e: FormEvent) { + e.preventDefault() + } + return accountId ? (