#8917 Fix "Cannot find secrets in storage" error on Reset Everything#9128
Conversation
|
@bmarty , I have another bugfix PR for you if you have some time to review it. It is a one line fix, so hopefully an easy review. |
|
@christianrowlands Can you create a test in SharedSecureStorageViewModelTest ? |
|
@BillCarsonFr , yep, I can do that. I added the test. |
BillCarsonFr
left a comment
There was a problem hiding this comment.
@bmarty This is probably fixing the issue but I think there is a design problem.
It was introduced by #7721
The steps were initialy internal states, starting from a known point. It was triggering async things in the view model constructor.
Now the steps has been moved outside as a configurable thing. That's why there is this strange mix of step and requestType
Looks like we probably should have left the step as an internal thing and introduce a new RequestType. Or instead the SelfVerification Bottomsheet should directly call the navigator.open4SSetup(HARD_RESET)
... We won't probably spend time doing that
Type of change
Content
Skip the SSSS integrity check when the user is in the "Reset everything" flow. The integrity check at
SharedSecureStorageViewModelinit validates that secrets exist in storage before proceeding but the "Reset everything" flow is specifically for when the user has lost access to their secrets. This creates a state where the reset fails because the very secrets the user wants to reset cannot be found.The fix adds the same
ResetAllstep guard that already exists below for the key lookup (line 109), making the two checks consistent.Motivation and context
Here is the issue this is fixing: #8917
Tests
Tested devices
Checklist
Signed-off-by: Christian Rowlands <craxiomdev [at] gmail.com>