1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

network change fix

This commit is contained in:
Matthias Kretschmann 2020-10-02 14:07:17 +02:00
parent 68ed8fd348
commit a322c443ed
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 2 additions and 3 deletions

View File

@ -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<HTMLButtonElement>) {
// prevent accidentially submitting a form the button might be in

View File

@ -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)
}