feat: Hide Cancel and Speed up when gas is paid with alternate token#40804
feat: Hide Cancel and Speed up when gas is paid with alternate token#40804vinistevam merged 6 commits intomainfrom
Conversation
…TransactionListItem test: add tests for useHasGasFeeTokenSelected and remove tests for useIs7702Transaction
|
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. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (2 files, +66 -4)
|
Builds ready [d288466]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
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.
Builds ready [9832240]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [c5e2ad7]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [8c3bbbe]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|



Description
Cancel and Speed up in the activity list should not be shown when the user has chosen a non‑native token to pay for gas, because those flows are not supported for gas‑fee‑token transactions.
Changelog
CHANGELOG entry: Added check for hiding Cancel and Speed up in the activity list when the user has selected another token to pay for gas
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/7073
Manual testing steps
Screenshots/Recordings
7702.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes the conditions for showing Speed Up/Cancel actions on pending transactions, which could impact users’ ability to manage transactions if the
selectedGasFeeTokenflag is set incorrectly. Scope is limited to UI gating and is covered by added unit tests.Overview
Updates
TransactionListItemto hide the Cancel and Speed Up buttons when a transaction’sprimaryTransaction.selectedGasFeeTokenis set (i.e., gas is paid with a non-native token), since those flows aren’t supported for gas-fee-token transactions.Adds unit tests that mock
useShouldShowSpeedUpand verify the buttons are hidden whenselectedGasFeeTokenis present and still shown when it is absent and other conditions allow.Written by Cursor Bugbot for commit 8c3bbbe. This will update automatically on new commits. Configure here.