feat: Confirmation Redesign "Confirm" button should be red when transaction is malicious
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
- set
ENABLE_CONFIRMATION_REDESIGN=truein .metamaskrc - enable Experimental > Redesign Confirmation in settings
- test malicious signature e.g. PPOM - Malicious Permit in test-dapp
- observe red button
Screenshots/Recordings
Before
After
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.
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 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.
Builds ready [bb108e3]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1581 ± 663 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 61 | 166 | 103 | 31 | 15 |
| domContentLoaded | 8 | 61 | 19 | 14 | 7 | ||
| load | 49 | 2953 | 1581 | 1380 | 663 | ||
| domInteractive | 8 | 61 | 19 | 14 | 7 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.07 KiB (0.03%)
- common: 0 Bytes (0.00%)
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.