diff --git a/src/components/MagicCodeInput.tsx b/src/components/MagicCodeInput.tsx index e989e515c62b..6487530be7d0 100644 --- a/src/components/MagicCodeInput.tsx +++ b/src/components/MagicCodeInput.tsx @@ -57,9 +57,6 @@ type MagicCodeInputProps = { /** TestID for test */ testID?: string; - - /** Whether to allow auto submit again after the previous attempt fails */ - allowResubmit?: boolean; }; type MagicCodeInputHandle = { @@ -108,7 +105,6 @@ function MagicCodeInput( autoComplete, hasError = false, testID = '', - allowResubmit = false, }: MagicCodeInputProps, ref: ForwardedRef, ) { @@ -179,7 +175,7 @@ function MagicCodeInput( const validateAndSubmit = () => { const numbers = decomposeString(value, maxLength); // eslint-disable-next-line @typescript-eslint/no-use-before-define - if ((wasSubmitted && !allowResubmit) || !shouldSubmitOnComplete || numbers.filter((n) => isNumeric(n)).length !== maxLength || isOffline) { + if (wasSubmitted || !shouldSubmitOnComplete || numbers.filter((n) => isNumeric(n)).length !== maxLength || isOffline) { return; } if (!wasSubmitted) { diff --git a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx index 8628fc19ab06..b9f6b75e346a 100644 --- a/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx +++ b/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx @@ -80,9 +80,6 @@ type ValidateCodeFormProps = { /** Whether the form is loading or not */ isLoading?: boolean; - /** Whether to allow auto submit again after the previous attempt fails */ - allowResubmit?: boolean; - /** Whether to show skip button */ shouldShowSkipButton?: boolean; @@ -104,7 +101,6 @@ function BaseValidateCodeForm({ hideSubmitButton, submitButtonText, isLoading, - allowResubmit, shouldShowSkipButton = false, handleSkipButtonPress, }: ValidateCodeFormProps) { @@ -271,7 +267,6 @@ function BaseValidateCodeForm({ hasError={canShowError && !isEmptyObject(finalValidateError)} onFulfill={validateAndSubmitForm} autoFocus={false} - allowResubmit={allowResubmit} /> {shouldShowTimer && ( @@ -327,6 +322,7 @@ function BaseValidateCodeForm({