metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

feat: Confirmation Redesign "Confirm" button should be red when transaction is malicious

Open digiwand opened this issue 1 year ago • 1 comments

Description

The confirm button should be red when the transaction is identified as malicious. There is ongoing work (Alerts) that will replace logic from this PR in the near future. This is the reason why full test coverage was not added here.

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2448

Manual testing steps

  1. set ENABLE_CONFIRMATION_REDESIGN=true in .metamaskrc
  2. enable Experimental > Redesign Confirmation in settings
  3. test malicious signature e.g. PPOM - Malicious Permit in test-dapp
  4. observe red button

Screenshots/Recordings

Before

After

Screenshot 2024-05-07 at 6 31 10 AM Screenshot 2024-05-07 at 6 19 33 AM

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.

digiwand avatar May 07 '24 13:05 digiwand

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.

github-actions[bot] avatar May 07 '24 13:05 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.45%. Comparing base (fa150dc) to head (bb108e3).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24402      +/-   ##
===========================================
+ Coverage    67.44%   67.45%   +0.01%     
===========================================
  Files         1286     1288       +2     
  Lines        50137    50149      +12     
  Branches     13006    13008       +2     
===========================================
+ Hits         33812    33824      +12     
  Misses       16325    16325              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 14:05 codecov[bot]

Builds ready [bb108e3]
Page Load Metrics (1581 ± 663 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint611661033115
domContentLoaded86119147
load49295315811380663
domInteractive86119147
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 2.07 KiB (0.03%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar May 10 '24 14:05 metamaskbot

Missing release label release-11.17.0 on PR. Adding release label release-11.17.0 on PR and removing other release labels(release-11.18.0), as PR was added to branch 11.17.0 when release was cut.

metamaskbot avatar May 23 '24 23:05 metamaskbot