Skip to content

refactor: remove legacy cancel speed up components and related files#26353

Merged
vinistevam merged 42 commits into
mainfrom
vs/cleanup-cancel-speedup-legacy
Mar 16, 2026
Merged

refactor: remove legacy cancel speed up components and related files#26353
vinistevam merged 42 commits into
mainfrom
vs/cleanup-cancel-speedup-legacy

Conversation

@vinistevam

@vinistevam vinistevam commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Description

Removes legacy cancel/speed-up code and consolidates on the single CancelSpeedupModal flow. This includes dropping unused EIP-1559 modal state and deleting legacy confirmation components that are no longer used.

Motivation

  • The cancel/speed-up flow now uses only CancelSpeedupModal (with useCancelSpeedupGas). The previous EIP-1559–specific modal state (speedUp1559IsOpen, cancel1559IsOpen) was never set to true and only reset to false, so it was dead code.
  • Legacy confirmation components (EditGasFee1559Update, EditGasFeeLegacyUpdate, UpdateEIP1559Tx) have been superseded by the unified cancel/speed-up flow and are no longer referenced.

Changes

Legacy state cleanup

  • useUnifiedTxActions: Removed speedUp1559IsOpen and cancel1559IsOpen state, their setters in open/close/error paths, and from the hook’s return value. Only speedUpIsOpen and cancelIsOpen are used with CancelSpeedupModal.
  • Transactions/index.js: Removed speedUp1559IsOpen and cancel1559IsOpen from component state and from all setState calls in onSpeedUpCompleted, onCancelCompleted, and the speed-up/cancel failure handlers.
  • Tests: Updated useUnifiedTxActions.test.ts, UnifiedTransactionsView.test.tsx, and Transactions/index.test.tsx to drop assertions and mocks for the removed 1559 modal state.

Legacy component removal

  • Deleted app/components/Views/confirmations/legacy/components/EditGasFee1559Update/ (index, styles, types).
  • Deleted app/components/Views/confirmations/legacy/components/EditGasFeeLegacyUpdate/ (component, styles, types, test, snapshot).
  • Deleted app/components/Views/confirmations/legacy/components/UpdateEIP1559Tx/ (index, types).

Cancel/speed-up is now handled solely by CancelSpeedupModal in both UnifiedTransactionsView and the legacy Transactions list.

Manual: open Activity, trigger Speed up or Cancel on a pending transaction and confirm the modal and flow behave as before.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/2411

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

test.speed.up.webm
test-cancel.webm

Before

After

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

Medium Risk
Touches the speed-up/cancel transaction flow by removing legacy UI/components and slightly refactoring param handling; regressions would affect replacing pending transactions if any removed paths were still reachable.

Overview
Removes the deprecated legacy gas-edit components and snapshots for speed-up/cancel flows (including EditGasFee1559, EditGasFeeLegacy, EditGasFee*Update, and UpdateEIP1559Tx), consolidating on the single CancelSpeedupModal-based path.

Cleans up related code and tests by dropping now-unused mocks/state and minor refactoring in useUnifiedTxActions to compute gas params once before dispatching speed-up/cancel actions. Also fixes formatting in docs/readme/deeplinking.md by converting an admonition block into plain blockquoted lines.

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

@vinistevam vinistevam added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Feb 20, 2026
@github-actions

Copy link
Copy Markdown
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.

@vinistevam vinistevam marked this pull request as ready for review February 23, 2026 09:46
@vinistevam vinistevam requested review from a team as code owners February 23, 2026 09:46
Comment thread app/components/Views/UnifiedTransactionsView/useUnifiedTxActions.test.ts Outdated
@vinistevam vinistevam requested review from a team as code owners February 23, 2026 14:07
@vinistevam vinistevam force-pushed the vs/cleanup-cancel-speedup-legacy branch from 59abc89 to cbc7fd7 Compare February 23, 2026 14:10
Comment thread app/components/UI/Transactions/index.js Outdated
Base automatically changed from vs/new-cancel-speedup-ui to main March 3, 2026 09:28
@vinistevam vinistevam dismissed jpuri’s stale review March 3, 2026 09:28

The base branch was changed.

Comment thread app/components/UI/Transactions/index.js Outdated
@vinistevam

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/Views/UnifiedTransactionsView/useUnifiedTxActions.ts
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmations, SmokeWalletPlatform
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 80%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes primarily affect gas fee editing components (EIP-1559 and Legacy), legacy confirmation update flows (UpdateEIP1559Tx, EditGasFeeLegacyUpdate), and transaction display logic (Transactions component, UnifiedTransactionsView and related hook).

  1. SmokeConfirmations is required because:
  • Gas fee editing (EIP-1559 and legacy) is part of the transaction confirmation flow.
  • Update transaction flows directly impact confirmation screens.
  • Any regression here could break send, approve, contract interaction, swap confirmations, and signature-related confirmations.
  1. SmokeWalletPlatform is required because:
  • Changes to Transactions component and UnifiedTransactionsView impact the activity/transaction history display.
  • Transaction history visibility and rendering are validated under this tag.
  • Wallet platform features include transaction history and activity updates after confirmations.

No controller, Engine, network, multi-chain, trade, snaps, ramps, perps, or predictions logic was modified, so related tags are not required.

Overall risk is medium due to direct impact on confirmation UI and transaction history, which are critical user flows but localized to UI and view-layer logic.

Performance Test Selection:
Changes are limited to UI components and confirmation view logic without modifications to core state management, controllers, rendering of large lists, app launch, onboarding, or swap quote fetching. No expected measurable impact on app startup, asset loading, account list performance, or swap/predict/perps performance.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@vinistevam vinistevam added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 045f96c Mar 16, 2026
99 of 100 checks passed
@vinistevam vinistevam deleted the vs/cleanup-cancel-speedup-legacy branch March 16, 2026 10:30
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 16, 2026
@metamaskbot metamaskbot added the release-7.71.0 Issue or pull request that will be included in release 7.71.0 label Mar 16, 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.71.0 Issue or pull request that will be included in release 7.71.0 size-XL team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants