-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Vault corruption recovery flow #4421
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
f1f0c44
to
da9f203
Compare
da9f203
to
bd6f189
Compare
410ffa0
to
31daa76
Compare
cf7fbc6
to
b50ec60
Compare
f9b5a8e
to
b5b8107
Compare
8e3a949
to
6e1fdfe
Compare
915ad1f
to
21cf75b
Compare
6e1fdfe
to
29a1c28
Compare
2cd65f0
to
d3db14a
Compare
6637a5d
to
aaca80d
Compare
e8ad492
to
0efbae1
Compare
aaca80d
to
7059e58
Compare
e271313
to
62f6ea0
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.
Tested on
iPhone Xr iOS 16.1.1
Samsung Galaxy M21 Android 12, One UI Core version 4.1
commit e271313
Issue 01-05 confirmed fixed.
4421_Android_successful backup.mov
4421_iOS_successful backup.mp4
4421_Android_failed backup.mov
4421_iOS_failed backup.mp4
QA Passed ✅
Description
Why?
67 000
times and has effectedover 2000 users
What?
How?
This is a fairly complex fix so I will try to highlight how this is working....
app/core/backupVault.ts
methodbackupVault
app/core/Engine.js
handleVaultBackup
Engine.init
to accept an optional param of the keyring state.Login/index.js
, start the recovery flow by calling handleVaultCorruption which ...RestoreWallet
. This screen calls EngineService.initializeVaultFromBackup().Engine.init(state, keyringState)
this.updateControllers
WalletRestored
screen. Here we will attempt a login (using the previously stored credentials) by callingawait Authentication.appTriggeredAuth(selectedAddress); navigation.navigate(Routes.ONBOARDING.HOME_NAV);
- if we don't have the credentials stored (the case for password login) we will simply navigate the user to Login where they can login normally. the vault/engine have been reinitialized at this point.
Acceptance criteria
Restore wallet
the old engine is destroyed, a new engine is reinitialized with the vault backup and they are navigated to theWalletRestored
screen.WalletRestored
there are three potential outcomes to pressing theContinue to wallet
button...goes back to login
we get the biometrics on the wallet restored success screen (faceID or passcode or fingerprint) and on success we log you in and you are navigated to the wallet view
the user gets logged in automatically and is navigated to the wallet view
WalletResetNeeded
screen. This screen only appears if the engine does not successfully get reinitialized inRestoreWallet
TODO
WalletResetNeeded
screen.initializeVaultFromBackup
Checklist
Designs
Screenshots/Recordings
the version here has some minor UX issues around the loading state of the WalletRestored screen
RPReplay_Final1671576645.mov
Issue
Progresses https://github.com/MetaMask/mobile-planning/issues/139
progresses #5420
Resolves #4645