diff --git a/src/libs/actions/User.ts b/src/libs/actions/User.ts index 4aa8b1e7ec1f..885969857d72 100644 --- a/src/libs/actions/User.ts +++ b/src/libs/actions/User.ts @@ -284,6 +284,15 @@ function clearValidateCodeActionError(fieldName: string) { }); } +/** + * Reset validateCodeSent on validate action code. + */ +function resetValidateActionCodeSent() { + Onyx.merge(ONYXKEYS.VALIDATE_ACTION_CODE, { + validateCodeSent: false, + }); +} + /** * Clears any possible stored errors for a specific field on a contact method */ @@ -1416,4 +1425,5 @@ export { clearValidateCodeActionError, subscribeToActiveGuides, setIsDebugModeEnabled, + resetValidateActionCodeSent, }; diff --git a/src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx b/src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx index c65ae8957dbe..07b888aaa5f0 100644 --- a/src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx +++ b/src/pages/workspace/expensifyCard/issueNew/ConfirmationStep.tsx @@ -51,6 +51,7 @@ function ConfirmationStep({policyID, backTo}: ConfirmationStepProps) { useEffect(() => { submitButton.current?.focus(); + User.resetValidateActionCodeSent(); }, []); useEffect(() => {