Skip to content

Commit

Permalink
Merge pull request #53681 from daledah/fix/52784
Browse files Browse the repository at this point in the history
  • Loading branch information
dangrous authored Dec 13, 2024
2 parents 2c3c9ac + 03276a7 commit 33ce301
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -1416,4 +1425,5 @@ export {
clearValidateCodeActionError,
subscribeToActiveGuides,
setIsDebugModeEnabled,
resetValidateActionCodeSent,
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function ConfirmationStep({policyID, backTo}: ConfirmationStepProps) {

useEffect(() => {
submitButton.current?.focus();
User.resetValidateActionCodeSent();
}, []);

useEffect(() => {
Expand Down

0 comments on commit 33ce301

Please sign in to comment.