diff --git a/client/src/hooks/useAccount.ts b/client/src/hooks/useAccount.ts index 4e3e83dfc..ddda966a9 100644 --- a/client/src/hooks/useAccount.ts +++ b/client/src/hooks/useAccount.ts @@ -46,11 +46,11 @@ const useAccount = () => { }; useEffect(() => { - const existEmptyField = bankName.trim() === '' && accountNumber.trim() === ''; + const existEmptyField = bankNameState.trim() === '' || accountNumberState.trim() === ''; const isChanged = bankName !== bankNameState || accountNumber !== accountNumberState; setCanSubmit(!existEmptyField && isChanged); - }, [bankName, accountNumber, bankNameState, accountNumberState]); + }, [bankNameState, accountNumberState]); return { bankName: bankNameState,