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: unmount Settings on blur to hide credential #8211

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

gantunesr
Copy link
Member

@gantunesr gantunesr commented Jan 7, 2024

Description

Currently there's an edge case that displays the seed phrase or private key without the use of password when the user tries to reveal the private key from the wallet view, this is caused by the screen not unmounting when changing tabs. The change in this PR sets a flag to unmount the Settings tab whenever the user navigates from it.

React Navigation source

Related issues

Fixes: #8210

Manual testing steps

Same steps as indicated in ticket #8210

  1. Have a wallet configured with SRP backed up and be at wallet view
  2. Tap settings gear
  3. Tap Security & Privacy
  4. Tap Reveal Secret Recovery Phrase
  5. Tap Get started
  6. Complete the quiz
  7. Supply password
  8. Tap Next
  9. Tap and hold Hold to reveal SRP
  10. When SRP is displayed do NOT tap Done
  11. Tap Wallet on bottom left to return to wallet view
  12. Tap 3 dots next to public address
  13. Tap Show private key
  14. See that the screen display the correct texts and the private key is protect by the password

Screenshots/Recordings

Before

Screen.Recording.2024-01-07.at.12.42.17.mov

After

Screen.Recording.2024-01-07.at.12.41.25.mov

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 Jan 7, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/514dd850-ff26-4ed1-a2d8-6fc0bc240d35
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8942bb7) 39.65% compared to head (fcd2bb0) 39.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8211   +/-   ##
=======================================
  Coverage   39.65%   39.65%           
=======================================
  Files        1233     1233           
  Lines       29820    29820           
  Branches     2840     2840           
=======================================
  Hits        11824    11824           
  Misses      17307    17307           
  Partials      689      689           

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

@gantunesr gantunesr marked this pull request as ready for review January 8, 2024 10:16
@gantunesr gantunesr requested a review from a team as a code owner January 8, 2024 10:16
@gantunesr gantunesr self-assigned this Jan 8, 2024
Copy link
Contributor

github-actions bot commented Jan 8, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/cbde6670-1eec-4208-aeab-aae5d233c786
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link
Contributor

github-actions bot commented Jan 8, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/dd1efeba-3f83-4370-b7ab-0b0540acf5a7
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@gantunesr gantunesr added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 8, 2024
@gantunesr gantunesr added needs-qa Any New Features that needs a full manual QA prior to being added to a release. Run Smoke E2E and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E labels Jan 8, 2024
Copy link
Contributor

github-actions bot commented Jan 8, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/15c4d0a0-496e-4d7a-acec-cb28fcd0797d
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@plasmacorral plasmacorral added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Jan 8, 2024
@plasmacorral
Copy link
Contributor

Android builds are blocked atm #8220 (comment)

@plasmacorral plasmacorral added Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking and removed QA in Progress QA has started on the feature. labels Jan 8, 2024
Copy link
Contributor

github-actions bot commented Jan 9, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ea82cc72-4e1a-4564-8505-04e11866746d
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link

sonarcloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@gantunesr gantunesr merged commit fc1dff1 into main Jan 9, 2024
29 checks passed
@gantunesr gantunesr deleted the fix/unmount-settings-on-blur branch January 9, 2024 10:21
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
@metamaskbot metamaskbot added the release-7.15.0 Issue or pull request that will be included in release 7.15.0 label Jan 9, 2024
@angelcheung22 angelcheung22 added this to the Q1 2024 milestone Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.15.0 Issue or pull request that will be included in release 7.15.0 Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SRP displayed when attempting to reveal private key
6 participants