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

feat: hide alert when navigating to protect wallet #7534

Merged
merged 13 commits into from
Feb 5, 2024

Conversation

tommasini
Copy link
Contributor

@tommasini tommasini commented Oct 18, 2023

Description

This PR aims to solve a bug on the backup alert, when navigating to the protect your wallet screen the alert kept being visible.

This PR contains BackupAlert converted to typescript and functional component.

Manual testing steps

_1. Step1: Create a new wallet
_2. Step2: Do not protect your wallet pressing (remember later)
_3. Step3: Press protect your wallet on the backup alert
_4. Step4: The protect your wallet should not be there

Screenshots/Recordings

https://recordit.co/skV2sxdzil

new Bell Icon:
image
image

Before

[screenshot]

After

[screenshot]

Related issues

_Fixes #4400

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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.

…react native testing library, convert it to a functional component, and added the current adopted structure folder, fixed the bug when navigating to the protect wallet flow, the allert will not be visible
@github-actions
Copy link
Contributor

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.

@socket-security
Copy link

socket-security bot commented Oct 18, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/react-native-elevated-view@0.0.4 None +5 1.74 MB types

View full report↗︎

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (6d26e45) 40.33% compared to head (23e1a15) 40.50%.
Report is 28 commits behind head on main.

Files Patch % Lines
app/components/UI/BackupAlert/BackupAlert.tsx 80.00% 5 Missing and 1 partial ⚠️
...pp/components/UI/BackupAlert/BackupAlert.styles.ts 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7534      +/-   ##
==========================================
+ Coverage   40.33%   40.50%   +0.17%     
==========================================
  Files        1235     1241       +6     
  Lines       29949    29980      +31     
  Branches     2875     2881       +6     
==========================================
+ Hits        12079    12144      +65     
+ Misses      17175    17136      -39     
- Partials      695      700       +5     

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

@socket-security
Copy link

socket-security bot commented Oct 25, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@sonarcloud
Copy link

sonarcloud bot commented Oct 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

74.1% 74.1% Coverage
0.0% 0.0% Duplication

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Dec 20, 2023
@tommasini tommasini marked this pull request as ready for review December 20, 2023 11:43
@tommasini tommasini requested a review from a team as a code owner December 20, 2023 11:43
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/cdfda616-4a73-4878-be99-1441696980e4
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/983ce1bd-ef0f-4581-b1ff-7928ddb7061d
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@tommasini tommasini added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 21, 2023
@plasmacorral
Copy link
Contributor

Had a chance to take a quick look here and am confident that this addresses the issue reported. Specifically, tested with the SRP backup demand flow and was pleased with the result.

Tested commit 55d3aee on Samsung a515f with Android 12.

Manual testing steps for SRP backup demand

  1. Create a new wallet
  2. Do not protect your wallet pressing (remember later)
  3. Import a PK for an account with assets present to trigger backup demand
  4. App is unusable for anything but SRP backup
  5. Warning is also not presented overtop the SRP backup flow in this condition

app/components/UI/BackupAlert/BackupAlert.styles.ts Outdated Show resolved Hide resolved
app/components/UI/BackupAlert/BackupAlert.styles.ts Outdated Show resolved Hide resolved
app/components/UI/BackupAlert/BackupAlert.tsx Outdated Show resolved Hide resolved
app/components/UI/BackupAlert/BackupAlert.tsx Outdated Show resolved Hide resolved
@tommasini
Copy link
Contributor Author

Actually there is a new Bell Icon already, will ask for design-qa, updated the final result on the description

@tommasini tommasini added the design-review Any feature that needs feedback from the design team label Jan 25, 2024
Copy link

sonarcloud bot commented Jan 26, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
81.5% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@yanrong-chen
Copy link

@tommasini Looks good to me for now! Thank you for checking with me. Later we can also update this to use our DS banner alert component

Copy link
Contributor

@MarioAslau MarioAslau left a comment

Choose a reason for hiding this comment

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

Codewise it looks great Tomas! I dm'd you a couple of questions regarding the context of some choices

@gauthierpetetin gauthierpetetin added team-accounts team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead labels Feb 2, 2024
@tommasini tommasini removed the design-review Any feature that needs feedback from the design team label Feb 2, 2024
Copy link
Contributor

@jpcloureiro jpcloureiro left a comment

Choose a reason for hiding this comment

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

LGTM

@tommasini tommasini added the Run Smoke E2E Triggers smoke e2e on Bitrise label Feb 5, 2024
Copy link
Contributor

github-actions bot commented Feb 5, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/51d64361-f28e-47b5-914a-0c8ab7dda971
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@tommasini tommasini merged commit 376be1e into main Feb 5, 2024
34 checks passed
@tommasini tommasini deleted the fix/4400-alert-backup branch February 5, 2024 12:27
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
@github-actions github-actions bot removed product-backlog needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Feb 5, 2024
@metamaskbot metamaskbot added the release-7.17.0 Issue or pull request that will be included in release 7.17.0 label Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-7.17.0 Issue or pull request that will be included in release 7.17.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants