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: Adds opensea to blockaid migration BannerAlert #23743

Merged
merged 9 commits into from
Mar 27, 2024
Merged

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Mar 26, 2024

Description

This adds a notice to transaction and signature confirmations for users who have been automatically migrated from the security alerts by Open Sea to security alerts by Blockaid (see #23460) and are on networks that are not supported by Blockaid. The notice can be dismissed and is not shown again once that happens.

The PR adds e2e tests to verify the change for simple send, token approval, personal signature, and contract interaction.

We intend to remove this notice after a few releases.

Open in GitHub Codespaces

Related issues

Fixes: #2134

Related: #23546 and #23460

Manual testing steps

  1. Checkout the extension on a commit prior to feat: change in security settings - removing opensea provider and design changes #23546 (for example, 112b155d59)
  2. Build the app and open metamask
  3. Select security alerts by open sea
Screenshot 2024-03-27 at 11 01 38
  1. Checkout this branch, build and reload on the managing extensions page
  2. Switch to Linea Goerli, or another network that is not currently supported by blockaid
  3. Open the testdApp and trigger a new confirmation
  4. The Banner Alert should show up

Screenshots/Recordings

After

Simple Send

Screenshot 2024-03-26 at 19 04 56

Token Approval

Screenshot 2024-03-26 at 19 02 11

Personal Signature

Screenshot 2024-03-26 at 19 00 04

Contract Interaction

Screenshot 2024-03-26 at 19 07 44

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

@pedronfigueiredo pedronfigueiredo added team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-secure-ux-PR PRs from the confirmations team labels Mar 26, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Mar 26, 2024
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.

digiwand
digiwand previously approved these changes Mar 26, 2024
ui/selectors/selectors.js Outdated Show resolved Hide resolved
ui/pages/confirmations/token-allowance/token-allowance.js Outdated Show resolved Hide resolved
segun
segun previously approved these changes Mar 27, 2024
@pedronfigueiredo pedronfigueiredo marked this pull request as ready for review March 27, 2024 12:39
@pedronfigueiredo pedronfigueiredo requested review from a team as code owners March 27, 2024 12:39
@metamaskbot
Copy link
Collaborator

Builds ready [299652a]
Page Load Metrics (1194 ± 562 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint8058918011153
domContentLoaded11385497938
load64279411941170562
domInteractive11385497938
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -3.25 KiB (-0.09%)
  • ui: 3.65 KiB (0.05%)
  • common: 3.79 KiB (0.08%)

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

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

Project coverage is 69.17%. Comparing base (3f1dd0c) to head (299652a).
Report is 1 commits behind head on develop.

Files Patch % Lines
ui/store/actions.ts 0.00% 6 Missing ⚠️
app/scripts/metamask-controller.js 0.00% 4 Missing ⚠️
...t-original/signature-request-original.component.js 55.56% 4 Missing ⚠️
...saction-base/confirm-transaction-base.component.js 42.86% 4 Missing ⚠️
...s/confirmations/token-allowance/token-allowance.js 60.00% 4 Missing ⚠️
app/scripts/controllers/preferences.js 50.00% 2 Missing ⚠️
...t-original/signature-request-original.container.js 75.00% 1 Missing ⚠️
...saction-base/confirm-transaction-base.container.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #23743      +/-   ##
===========================================
- Coverage    69.20%   69.17%   -0.03%     
===========================================
  Files         1160     1160              
  Lines        44182    44252      +70     
  Branches     11814    11832      +18     
===========================================
+ Hits         30573    30610      +37     
- Misses       13609    13642      +33     

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

@pedronfigueiredo pedronfigueiredo merged commit de76c52 into develop Mar 27, 2024
66 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/2134 branch March 27, 2024 14:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
@metamaskbot metamaskbot added the release-11.15.0 Issue or pull request that will be included in release 11.15.0 label Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.15.0 Issue or pull request that will be included in release 11.15.0 team-confirmations-secure-ux DEPRECATED: please use "team-confirmations" label instead team-confirmations-secure-ux-PR PRs from the confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants