Fix verification modal getting stuck on Verifying after a correct code (WV-4229)#4857
Merged
Conversation
…e (WV-4229) When you signed up with your name and email on the For Voters page and then entered the emailed 6-digit code, the modal would get stuck on Verifying instead of closing and finishing. On a successful verification the component tried to close the modal by calling closeSignInModalLocal, but that only does something when a closeSignInModal prop is passed in. A few places that use this modal (WelcomeForVoters, CompleteYourProfile, and SetUpAccountEditName) only pass closeVerifyModal, so on success nothing closed the modal and it just sat there. A wrong code still worked since that path uses closeVerifyModal, so only the success case was broken. This adds a fallback so that when closeSignInModal isn't there it uses closeVerifyModal instead, which fixes those three flows without changing the ones that already passed closeSignInModal.
Member
|
Thank you @0x416c616e! 👍 |
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.
When you signed up with your name and email on the For Voters page and then entered the emailed 6-digit code, the modal would get stuck on Verifying forever instead of finishing. On a successful verification the component tried to close the modal by calling closeSignInModalLocal, but that function only does something if a closeSignInModal prop was passed in. A few of the places that use this modal, namely 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, then confirmed the modal now closes on a correct code, and checked that a wrong code still shows the error and lets you try again.