refactor: remove legacy cancel speed up components and related files#26353
Conversation
- Deleted EditGasFeeLegacy component and its styles. - Removed UpdateEIP1559Tx component and its types. - Cleaned up associated types and interfaces for gas fee handling.
|
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. |
59abc89 to
cbc7fd7
Compare
|
@metamaskbot update-mobile-fixture |
There was a problem hiding this comment.
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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
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: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
Removes legacy cancel/speed-up code and consolidates on the single
CancelSpeedupModalflow. This includes dropping unused EIP-1559 modal state and deleting legacy confirmation components that are no longer used.Motivation
CancelSpeedupModal(withuseCancelSpeedupGas). The previous EIP-1559–specific modal state (speedUp1559IsOpen,cancel1559IsOpen) was never set totrueand only reset tofalse, so it was dead code.EditGasFee1559Update,EditGasFeeLegacyUpdate,UpdateEIP1559Tx) have been superseded by the unified cancel/speed-up flow and are no longer referenced.Changes
Legacy state cleanup
useUnifiedTxActions: RemovedspeedUp1559IsOpenandcancel1559IsOpenstate, their setters in open/close/error paths, and from the hook’s return value. OnlyspeedUpIsOpenandcancelIsOpenare used withCancelSpeedupModal.Transactions/index.js: RemovedspeedUp1559IsOpenandcancel1559IsOpenfrom component state and from allsetStatecalls inonSpeedUpCompleted,onCancelCompleted, and the speed-up/cancel failure handlers.useUnifiedTxActions.test.ts,UnifiedTransactionsView.test.tsx, andTransactions/index.test.tsxto drop assertions and mocks for the removed 1559 modal state.Legacy component removal
app/components/Views/confirmations/legacy/components/EditGasFee1559Update/(index, styles, types).app/components/Views/confirmations/legacy/components/EditGasFeeLegacyUpdate/(component, styles, types, test, snapshot).app/components/Views/confirmations/legacy/components/UpdateEIP1559Tx/(index, types).Cancel/speed-up is now handled solely by
CancelSpeedupModalin bothUnifiedTransactionsViewand the legacyTransactionslist.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
Screenshots/Recordings
test.speed.up.webm
test-cancel.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
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, andUpdateEIP1559Tx), consolidating on the singleCancelSpeedupModal-based path.Cleans up related code and tests by dropping now-unused mocks/state and minor refactoring in
useUnifiedTxActionsto compute gas params once before dispatching speed-up/cancel actions. Also fixes formatting indocs/readme/deeplinking.mdby converting an admonition block into plain blockquoted lines.Written by Cursor Bugbot for commit c46bdd8. This will update automatically on new commits. Configure here.