Skip to content

chore: remove legacy confirmation code#24929

Merged
OGPoyraz merged 46 commits intomainfrom
chore/remove-legacy-confirmation-e2e-tests
Jan 28, 2026
Merged

chore: remove legacy confirmation code#24929
OGPoyraz merged 46 commits intomainfrom
chore/remove-legacy-confirmation-e2e-tests

Conversation

@OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Jan 20, 2026

Description

Remove all legacy confirmation related code from the codebase.

List of actions:

  • Legacy signature confirmations removed.
  • Legacy transaction confirmations removed.
  • Some components are still using legacy parts / utils, but those components are now under app/components/Views/confirmations/legacy/components. We will eventually remove/replace these components.
  • transaction reducer and their actions removed.
  • signatureRequest reducer and their actions removed.
  • Removed reducers were storing security alerts, hence there is a new reducer securityAlerts to store security alerts for both transaction and signature confirmations.
  • app/components/Nav/Main/RootRPCMethodsUI.js significantly simplified - removed unusued code and property connectors, we can now plan to make it more stable by doing TS conversion.
  • confirmations_redesign feature flag and all it's references removed, no more useConfirmationsRedesign hook.
  • Hardware wallets were already working as expected on redesigned confirmations, no logic changes here. Manual test of swaps already done, but we will ask team to test this PR exclusively.

Changelog

CHANGELOG entry:

Related issues

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

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

After

Hardware Wallet Recordings (Updated on 27 January 20:02)

Ledger send flow

ledger-send-flow.mp4

Ledger swap flow

ledger-swap-flow.mp4

QR Wallet send flow

qr-wallet-send-flow.mp4

QR Wallet swap flow

qr-wallet-swap-flow.mp4

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

Removes legacy confirmation system and fully adopts the redesigned confirmations, simplifying navigation and data flow.

  • Deletes legacy signature/transaction approval components, tests, and old transaction/signatureRequest actions/reducer; introduces unified securityAlerts storage and updates hooks (useSecurityAlertResponse) to read by confirmation ID
  • Replaces legacy QR signing paths with new QRSigningTransactionModal (added to navigation) and routes all QR signing from Transactions and unified tx actions to this modal
  • Simplifies RootRPCMethodsUI (drops Redux connectors/legacy transaction prep) and relies on redesigned confirmation routing via ConfirmRoot
  • Removes useConfirmationRedesignEnabled and related feature flags; staking/earn flows default to redesigned paths; updates tests accordingly
  • Removes pre-init send newAssetTransaction usage across UI (Wallet, Asset/Collectible views, QR scanner); send flow now navigates directly via redesigned hooks
  • Consolidates Blockaid components under components/blockaid-banner and updates imports/usages across confirmation UIs
  • Misc: cleans up QR modal to not dispatch reset actions, adjusts AccountInfo card to read signature requests, updates constants/names, and adds/refactors tests to match new flows

Written by Cursor Bugbot for commit e45d9f7. This will update automatically on new commits. Configure here.

@OGPoyraz OGPoyraz requested a review from a team as a code owner January 20, 2026 12:06
@OGPoyraz OGPoyraz added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jan 20, 2026
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Jan 20, 2026
cursor[bot]

This comment was marked as outdated.

@OGPoyraz OGPoyraz added the DO-NOT-MERGE Pull requests that should not be merged label Jan 21, 2026
@OGPoyraz OGPoyraz changed the title chore: remove legacy confirmation e2e tests (Phase 1) [WIP] chore: remove legacy confirmation code Jan 21, 2026
@OGPoyraz OGPoyraz force-pushed the chore/remove-legacy-confirmation-e2e-tests branch from dec6710 to 29c8f08 Compare January 21, 2026 09:13
@OGPoyraz OGPoyraz requested review from a team as code owners January 21, 2026 09:13
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@OGPoyraz OGPoyraz added the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label Jan 21, 2026
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

Can we move https://github.com/MetaMask/metamask-mobile/blob/chore/remove-legacy-confirmation-e2e-tests/e2e/specs/confirmations/transaction-pay.spec.ts to the confirmation redesign folder and get rid of the confirmations folder? There is only 1 test in there.

@OGPoyraz OGPoyraz force-pushed the chore/remove-legacy-confirmation-e2e-tests branch from c56d7b4 to 64a9b97 Compare January 22, 2026 08:00
cursor[bot]

This comment was marked as outdated.

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.80%. Comparing base (63159f5) to head (bad5602).

Files with missing lines Patch % Lines
.../confirmations/components/confirm/confirm-root.tsx 50.00% 2 Missing and 2 partials ⚠️
.../components/UI/QRHardware/QRSigningModal/index.tsx 0.00% 1 Missing ⚠️
...nts/Views/confirmations/hooks/useConfirmActions.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24929      +/-   ##
==========================================
- Coverage   79.93%   74.80%   -5.14%     
==========================================
  Files        4257     4212      -45     
  Lines      109292   107162    -2130     
  Branches    22875    22754     -121     
==========================================
- Hits        87359    80159    -7200     
- Misses      15882    21168    +5286     
+ Partials     6051     5835     -216     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OGPoyraz
Copy link
Member Author

Thanks for the feedback @cortisiko !
We want to get rid of "redesigned" wording and usage as this approach will be default. This is still good feedback - I will carry all confirmations-redesigned into confirmations folder

@OGPoyraz OGPoyraz force-pushed the chore/remove-legacy-confirmation-e2e-tests branch from 64a9b97 to dd607fb Compare January 23, 2026 05:20
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@OGPoyraz OGPoyraz requested review from a team as code owners January 23, 2026 07:51
@OGPoyraz OGPoyraz changed the title [WIP] chore: remove legacy confirmation code chore: remove legacy confirmation code Jan 23, 2026
@OGPoyraz OGPoyraz removed the DO-NOT-MERGE Pull requests that should not be merged label Jan 23, 2026
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found

All E2E tests pre-selected.

View GitHub Actions results

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@OGPoyraz OGPoyraz enabled auto-merge January 28, 2026 16:31
@sonarqubecloud
Copy link

Copy link
Contributor

@caieu caieu left a comment

Choose a reason for hiding this comment

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

LGTM

@OGPoyraz OGPoyraz added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit cb2e27a Jan 28, 2026
102 of 103 checks passed
@OGPoyraz OGPoyraz deleted the chore/remove-legacy-confirmation-e2e-tests branch January 28, 2026 17:47
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2026
@metamaskbot metamaskbot added release-7.65.0 Issue or pull request that will be included in release 7.65.0 release-7.64.0 Issue or pull request that will be included in release 7.64.0 and removed release-7.65.0 Issue or pull request that will be included in release 7.65.0 labels Jan 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-XL skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.