1
0
Fork 0

network switching

This commit is contained in:
Matthias Kretschmann 2023-11-01 15:37:49 +00:00
parent 2f98598ab9
commit e74c1d7cb5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { type ReactElement, useState } from 'react'
import { type ReactElement, useState, useEffect } from 'react'
import { useDebounce } from 'use-debounce'
import { useAccount } from 'wagmi'
import { ConnectButton } from '@rainbow-me/rainbowkit'
@ -24,6 +24,11 @@ export default function Web3Form(): ReactElement {
const isDisabled = !account
useEffect(() => {
if (!selectedToken) return
setAmount('')
}, [selectedToken])
return (
<form
className={styles.web3}