Skip to content
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

fix: Fix the QR code accounts disappear when password change. #8741

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

dawnseeker8
Copy link
Contributor

@dawnseeker8 dawnseeker8 commented Feb 27, 2024

Description

This PR will fix #8694 and #8693, the fix contain following change.

  1. in Vault.js, get the old QR keyring first before KeyringController.createNewVaultAndRestore.
  2. Modify existing reestoreQRKeyring method in Vault.js to regenerate the ledger keyring with existing account.
  3. Unit tests fix for above changes.

After some

Related issues

Fixes: #8694
#8693

Manual testing steps

For #8694

  1. From wallet view add hardware
  2. Select QR hardware
  3. Scan QR
  4. Confirm account added
  5. Go to Settings>Security and Privacy
  6. Change password
  7. On successfull password change, close out of settings and return to wallet view
  8. Open accounts drop-down
  9. You should still see the QR account appear in the list.

For #8693

  1. Import an SRP and complete setup using FaceID authentication (ios) or finger print authentication (android)
  2. Bind with QR address
  3. Verify QR addresses appear in the accounts drop down
  4. kill the metamask app in your mobile.
  5. Relaunch MMM and login using FaceID
  6. You should still see the QR account appear in the list.

Screenshots/Recordings

Before

PasswordChangeQRDisappear.mov

After

Screen_Recording_20240227_173031_MetaMask.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

github-actions bot commented Feb 27, 2024

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.

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 41.61%. Comparing base (27c9362) to head (2047fbc).

Files Patch % Lines
app/core/Vault.js 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8741      +/-   ##
==========================================
- Coverage   41.61%   41.61%   -0.01%     
==========================================
  Files        1269     1269              
  Lines       30869    30869              
  Branches     3086     3086              
==========================================
- Hits        12847    12846       -1     
- Misses      17245    17246       +1     
  Partials      777      777              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dawnseeker8 dawnseeker8 marked this pull request as ready for review February 27, 2024 09:07
@dawnseeker8 dawnseeker8 requested a review from a team as a code owner February 27, 2024 09:07
@github-actions github-actions bot added the Run Smoke E2E Triggers smoke e2e on Bitrise label Feb 27, 2024
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fea43d1c-c2f8-4e3a-87c4-3aab97669a26
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@dawnseeker8 dawnseeker8 added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 27, 2024
@NicolasMassart NicolasMassart added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Feb 29, 2024
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me on the code side.
This PR needs a QA pass.

@vivek-consensys
Copy link
Contributor

Tested locally and working as expected:-

Private Zenhub Video

@vivek-consensys vivek-consensys added QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Feb 29, 2024
@dawnseeker8 dawnseeker8 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8737a77
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/82ba044c-e286-4725-9ad0-99beb26805bb

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@vivek-consensys
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

@dawnseeker8
Copy link
Contributor Author

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8737a77 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/82ba044c-e286-4725-9ad0-99beb26805bb

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Britrise e2e pass even the github action pipeline show failed. MM team will fix the github action e2e tests issue in main

Copy link

sonarcloud bot commented Mar 5, 2024

@dawnseeker8 dawnseeker8 merged commit d669eb3 into main Mar 5, 2024
29 checks passed
@dawnseeker8 dawnseeker8 deleted the fix/8694-qr-account-disappear-issue branch March 5, 2024 07:31
@github-actions github-actions bot locked and limited conversation to collaborators Mar 5, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.19.0 Issue or pull request that will be included in release 7.19.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-hardware-wallets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: QR address disappears after a password change
5 participants