-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wallet] Fix account timeout issue during verification #5656
Conversation
8aa2054
to
1f0318a
Compare
1f0318a
to
a063e79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I see no tests were updated for this, can you add some to make sure this doesn't break in the future?
// Lock and ask user for a PIN because we | ||
// want to reset timeout for unlocked account | ||
clearPasswordCaches() | ||
yield call(unlockAccount, account, true) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes the user to be asked for their PIN when starting verification, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap 🙂
@@ -200,7 +200,7 @@ export const reducer = ( | |||
case Actions.COMPLETE_ATTESTATION_CODE: | |||
return { | |||
...state, | |||
...completeCodeReducer(state, state.numCompleteAttestations + 1), | |||
numCompleteAttestations: state.numCompleteAttestations + 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed because completeCodeReducer
should be used only for the case when we set completed codes initially. We can not use it here, because on this line
attestationCodes[i] = acceptedAttestationCodes[i] || { |
attestationCodes[i]
undefined yet acceptedAttestationCodes[i]
, which will be defined after this reducer is finishes.
@jeanregisser I have addressed the feedback! PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 👍
### Description #5656 has introduced mandatory enter of PIN code while onboarding flow to prevent account unlock timeout issue. This PR would disable it specifically to the initial onboarding (we hope that 10 minutes since user sets the PIN would be enough to finish onboarding initially) and keep it if user comes back to verification later. ### Caveat The only one I see is when user goes to verification from Home screen, enters PIN, press Start/Resume, press back, user again needs to enter a PIN code. Not sure how often this is happening and to which extent it would ruin the UX. ### Tested Initial onboarding with verification and return to verification flow later. ### Backwards compatibility Yes
@jeanregisser Verified task using Test flight build v1.4.0 (28) and Android play store (internal build) v1.4.0 (1004294317) and found that user is able to complete phone number verification flow with out facing any verification failed pop up. Verified on : iPhone XR (13.2.2) and Google Pixel XL (8.1) |
Description
Other changes
Fix issue, when last confirmed attestation code is become empty after it is confirmed.
Tested
Verification flow done
Related issues
Backwards compatibility
Yes