WV-4229: Fix verification modal stuck on "Verifying..." after correct code#4856
Closed
0x416c616e wants to merge 1 commit into
Closed
WV-4229: Fix verification modal stuck on "Verifying..." after correct code#48560x416c616e wants to merge 1 commit into
0x416c616e wants to merge 1 commit into
Conversation
… code SettingsVerifySecretCode.onVoterStoreChange closes the modal on a successful verification via closeSignInModalLocal(), which no-ops unless a closeSignInModal prop is passed. WelcomeForVoters, CompleteYourProfile, and SetUpAccountEditName render the modal with only closeVerifyModal, so successful verification never closed the modal and the button stayed on "Verifying..." indefinitely. Add a fallback in closeSignInModalLocal() to call closeVerifyModal when closeSignInModal is not provided, restoring the pre-regression behavior for those three entry points without affecting flows that pass closeSignInModal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Closing this to redo the commit message and description. Opening a fresh PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes WV-4229, where signing up with your name and email on the For Voters page and then entering the emailed 6-digit code would get stuck on Verifying forever instead of finishing. The reason was that when the code is verified successfully, the verification component tried to close the modal by calling closeSignInModalLocal, but that function only does something if a closeSignInModal prop was passed in. A few places that use this modal (WelcomeForVoters, CompleteYourProfile, and SetUpAccountEditName) only pass closeVerifyModal instead, so on success nothing actually closed the modal and it just sat there saying Verifying. Entering a wrong code still worked fine since that path uses closeVerifyModal, so only the success case was broken. The fix just adds a fallback so that when closeSignInModal isn't there, it uses closeVerifyModal instead, which gets those three flows working again without changing any of the flows that already passed closeSignInModal. I reproduced the stuck state first, confirmed the modal now closes on a correct code, and checked that a wrong code still shows the error and lets you try again.