From c5888c2d5cc9a96e25d90a52a762e813f7278568 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 30 Jan 2024 13:18:10 -0800 Subject: [PATCH] Fix if conditioned before hooks (#262) --- 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 (