Skip to content

Commit 0989d53

Browse files
committed
Removes isWriteLoading from index useEffect in favor of functional component version
1 parent 480a3c8 commit 0989d53

File tree

1 file changed

+2
-8
lines changed
  • erc20-wrapper-registry/frontend/pages

1 file changed

+2
-8
lines changed

erc20-wrapper-registry/frontend/pages/index.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
useChain,
44
useConnectionStatus,
55
useContract,
6-
useContractWrite,
76
useSigner,
87
} from '@thirdweb-dev/react'
98
import styles from '../styles/Home.module.css'
@@ -47,11 +46,6 @@ const Home: NextPage = () => {
4746
name: string
4847
}>()
4948
const [wrapTransaction, setWrapTransaction] = useState<string>()
50-
const {
51-
mutateAsync,
52-
isLoading: isWriteLoading,
53-
error: _error,
54-
} = useContractWrite(compliantFactoryContract, 'deployCompliantErc')
5549

5650
useEffect(() => {
5751
if (foundDeployedWrappedErc20) {
@@ -132,10 +126,10 @@ const Home: NextPage = () => {
132126
}, [nonCompliantERC20, signer])
133127

134128
useEffect(() => {
135-
if (!isContractLoading && !isWriteLoading) {
129+
if (!isContractLoading) {
136130
setIsPageLoading(false)
137131
}
138-
}, [isContractLoading, isWriteLoading])
132+
}, [isContractLoading])
139133

140134
/**
141135
* Aux hook to make sure user connected in optimismGoerli

0 commit comments

Comments
 (0)