From e06523905e96caea08d56412fbfab364ce13cecc Mon Sep 17 00:00:00 2001 From: Getabalew Date: Fri, 1 Nov 2024 13:57:40 +0300 Subject: [PATCH] fix: remove unneccessary condition --- .../ValidateCodeForm/BaseValidateCodeForm.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx index a4df2925f18e..f12da502805c 100644 --- a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx +++ b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx @@ -92,7 +92,6 @@ function BaseValidateCodeForm({ const shouldDisableResendValidateCode = !!isOffline || account?.isLoading; const focusTimeoutRef = useRef(null); const [timeRemaining, setTimeRemaining] = useState(CONST.REQUEST_CODE_DELAY as number); - const [isResent, setIsResent] = useState(false); const timerRef = useRef(); @@ -155,10 +154,6 @@ function BaseValidateCodeForm({ * Request a validate code / magic code be sent to verify this contact method */ const resendValidateCode = () => { - if (hasMagicCodeBeenSent && !isResent) { - return; - } - sendValidateCode(); inputValidateCodeRef.current?.clear(); setTimeRemaining(CONST.REQUEST_CODE_DELAY); @@ -229,10 +224,7 @@ function BaseValidateCodeForm({ { - resendValidateCode(); - setIsResent(true); - }} + onPress={resendValidateCode} underlayColor={theme.componentBG} hoverDimmingValue={1} pressDimmingValue={0.2}