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

fix: update isConfirmed logic in AlertModal to handle Danger severity correctly

Open AugmentedMode opened this issue 1 month ago • 3 comments

Description

Fixed the Alert modal so that now when you see the "Malicious address" alert, you'll need to check "I have acknowledged the alert and still want to proceed" before the "Got it" button becomes clickable.

Changelog

CHANGELOG entry: update isConfirmed logic in AlertModal to handle Danger severity correctly

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

Screenshot 2025-12-09 at 3 58 43 PM

After

Screenshot 2025-12-09 at 3 54 35 PM

Pre-merge author checklist

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.

[!NOTE] Cursor Bugbot is generating a summary for commit ae1a9f2170f81fee1fa6b29d1e95520ff985052c. Configure here.

AugmentedMode avatar Dec 09 '25 20:12 AugmentedMode

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 Dec 09 '25 20:12 github-actions[bot]

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmationsRedesigned
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

The change modifies the AlertModal component's button enable/disable logic based on alert severity and blocking status. The previous logic allowed the "Got It" button to be enabled for non-blocking alerts regardless of severity. The new logic requires checkbox acknowledgement (isConfirmed) for Danger severity non-blocking alerts, while other non-blocking alerts remain always enabled and blocking alerts remain disabled until acknowledged.

This is a targeted change to the confirmations alert modal system that affects user flows when acknowledging security/danger alerts. The E2E test file e2e/specs/confirmations-redesigned/signatures/alert-system.spec.ts directly tests this functionality including:

  • Security alert display for malicious requests
  • Alert acknowledgement via checkbox
  • Confirm button behavior after acknowledgement

The SmokeConfirmationsRedesigned tag is the appropriate choice as it covers all confirmation-related flows including the alert system being modified. This ensures the changed button enabled/disabled logic is validated through actual user flow testing.

View GitHub Actions results

github-actions[bot] avatar Dec 09 '25 20:12 github-actions[bot]