From e796bdd149d1f42e5f0f9c0a14b4ef0727ec2950 Mon Sep 17 00:00:00 2001 From: Bill He Date: Tue, 30 Jan 2024 13:09:13 -0800 Subject: [PATCH] Fix if conditioned before hooks --- src/views/forms/AccountManagementForms/DepositForm.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/forms/AccountManagementForms/DepositForm.tsx b/src/views/forms/AccountManagementForms/DepositForm.tsx index 26bf651..4b2ceb8 100644 --- a/src/views/forms/AccountManagementForms/DepositForm.tsx +++ b/src/views/forms/AccountManagementForms/DepositForm.tsx @@ -55,6 +55,7 @@ export const DepositForm = ({ onDeposit, onError }: DepositFormProps) => { const stringGetter = useStringGetter(); const [error, setError] = useState(null); const [isLoading, setIsLoading] = useState(false); + const [requireUserActionInWallet, setRequireUserActionInWallet] = useState(false); const { selectedNetwork } = useSelectedNetwork(); const { evmAddress, signerWagmi, publicClientWagmi, nobleAddress } = useAccounts(); @@ -373,8 +374,6 @@ export const DepositForm = ({ onDeposit, onError }: DepositFormProps) => { return ; } - const [requireUserActionInWallet, setRequireUserActionInWallet] = useState(false); - return (