Skip to content

feat: Hide Cancel and Speed up when gas is paid with alternate token#40804

Merged
vinistevam merged 6 commits intomainfrom
vs/hide_cancel_speedup_for_7702
Mar 19, 2026
Merged

feat: Hide Cancel and Speed up when gas is paid with alternate token#40804
vinistevam merged 6 commits intomainfrom
vs/hide_cancel_speedup_for_7702

Conversation

@vinistevam
Copy link
Copy Markdown
Contributor

@vinistevam vinistevam commented Mar 11, 2026

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.

Open in GitHub Codespaces

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

  1. Create a transaction and, in the gas/token selector, choose a different token (not native) to pay for gas.
  2. Submit the transaction (it will be pending).
  3. Open the activity list and locate that pending transaction.
  4. Expected: Speed up and Cancel buttons do not appear for that transaction.
  5. Optional: Create another pending transaction without selecting a different token for gas. Expected: Speed up and Cancel buttons do appear for that one.

Screenshots/Recordings

7702.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
Changes the conditions for showing Speed Up/Cancel actions on pending transactions, which could impact users’ ability to manage transactions if the selectedGasFeeToken flag is set incorrectly. Scope is limited to UI gating and is covered by added unit tests.

Overview
Updates TransactionListItem to hide the Cancel and Speed Up buttons when a transaction’s primaryTransaction.selectedGasFeeToken is 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 useShouldShowSpeedUp and verify the buttons are hidden when selectedGasFeeToken is 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.

…TransactionListItem

test: add tests for useHasGasFeeTokenSelected and remove tests for useIs7702Transaction
@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Mar 11, 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 changed the title feat: Hide Cancel and Speed up for EIP-7702 transactions in activity list feat: Hide Cancel and Speed up when gas is paid with alternate token Mar 11, 2026
@vinistevam vinistevam marked this pull request as ready for review March 11, 2026 14:35
@vinistevam vinistevam requested review from a team as code owners March 11, 2026 14:35
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 11, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (2 files, +66 -4)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 transaction-list-item/
          • 📄 transaction-list-item.component.js +15 -4
          • 📄 transaction-list-item.component.test.js +51 -0

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 11, 2026

Builds ready [d288466]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2932902973297297
total2932902973297297
Confirm Txconfirm_tx6108606561804261256180
total6108606561804261256180
Bridge User Actionsbridge_load_page24020329840277298
bridge_load_asset_picker1921901952195195
bridge_search_token72370774313731743
total1130110911752611191175
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14661229185911515381659
load12211018165410912891401
domContentLoaded12131015159010512841393
domInteractive3118157212682
firstPaint175671272173206375
backgroundConnect21519831315217245
firstReactRender20144052231
initialActions106124
loadScripts1015822138810410901193
setupStore1463561626
numNetworkReqs362792192885
Power User HomeuiStartup63962136180683500680216840
load13511172179112214041597
domContentLoaded13321165178011513801550
domInteractive3519168213668
firstPaint2219349291293358
backgroundConnect2638321146843486314913920
firstReactRender27196663036
initialActions108113
loadScripts1095947150710711451308
setupStore1766891833
numNetworkReqs1488725938155238
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192162222221222
srpButtonToSrpForm97921034101103
confirmSrpToPwForm21212212122
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16141811618
doneButtonToHomeScreen64458673151655731
openAccountMenuToAccountListLoaded292929212935629352935
total3915388339552839263955
Onboarding New WalletcreateWalletToSocialScreen2202182231221223
srpButtonToPwForm1081071091109109
createPwToRecoveryScreen888088
skipBackupToMetricsScreen35343613536
agreeButtonToOnboardingSuccess16151711717
doneButtonToAssetList55549262355614623
total94387910075410051007
Asset DetailsassetClickToPriceChart13210914513144145
total13210914513144145
Solana Asset DetailsassetClickToPriceChart92859649596
total92859649596
Import Srp HomeloginToHomeScreen2285225223263023022326
openAccountMenuAfterLogin78471062299106
homeAfterImportWithNewWallet25532415273514427212735
total49834743510514450935105
Send TransactionsopenSendPageFromHome22192732427
selectTokenToSendFormLoaded271743103443
reviewTransactionToConfirmationPage88384597553865975
total9298891016519071016
SwapopenSwapPageFromHome372057165557
fetchAndDisplaySwapQuotes269626932698226982698
total2733270427642227532764
🌐 Dapp Page Load Benchmarks

Current Commit: d288466 | Date: 3/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±41ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 736ms (±38ms) 🟢 | historical mean value: 738ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±13ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 41ms 1.03s 1.35s 1.08s 1.35s
domContentLoaded 736ms 38ms 715ms 1.01s 774ms 1.01s
firstPaint 81ms 13ms 64ms 200ms 88ms 200ms
firstContentfulPaint 81ms 13ms 64ms 200ms 88ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 584 Bytes (0.01%)
  • common: 20 Bytes (0%)

Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 12, 2026

Builds ready [9832240]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27926130516292305
total27926130516292305
Confirm Txconfirm_tx602560176032660326032
total602560176032660326032
Bridge User Actionsbridge_load_page2112042164212216
bridge_load_asset_picker25323428116258281
bridge_search_token7667537809772780
total1236122112541412531254
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14781239192511815251663
load12311006159410912781417
domContentLoaded12241002158610712741407
domInteractive2916137202676
firstPaint167711171156213309
backgroundConnect22120132615224242
firstReactRender19133442027
initialActions107125
loadScripts1019809138510710701201
setupStore146148141522
numNetworkReqs362783173680
Power User HomeuiStartup59811786139632437682810993
load13671195262617113991581
domContentLoaded13441185260816313711571
domInteractive39211622837101
firstPaint266861335207306378
backgroundConnect208634011002215128985949
firstReactRender29196683345
initialActions105112
loadScripts1105948238716011231329
setupStore1564881637
numNetworkReqs1485431045152259
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202192200220220
srpButtonToSrpForm92909529395
confirmSrpToPwForm22212202222
pwFormToMetricsScreen15151601616
metricsToWalletReadyScreen16151811718
doneButtonToHomeScreen63051576084684760
openAccountMenuToAccountListLoaded2919290529321129292932
total3954387040366639934036
Onboarding New WalletcreateWalletToSocialScreen2232222241223224
srpButtonToPwForm1091071112110111
createPwToRecoveryScreen989099
skipBackupToMetricsScreen37344233842
agreeButtonToOnboardingSuccess17171701717
doneButtonToAssetList50247955330491553
total89487193926884939
Asset DetailsassetClickToPriceChart56497195371
total56497195371
Solana Asset DetailsassetClickToPriceChart81391223090122
total81391223090122
Import Srp HomeloginToHomeScreen2403232825559324692555
openAccountMenuAfterLogin63556976969
homeAfterImportWithNewWallet1616560233081622692330
total40872959485582847264855
Send TransactionsopenSendPageFromHome27242922829
selectTokenToSendFormLoaded32293523235
reviewTransactionToConfirmationPage920651114216910431142
total990715125918411041259
SwapopenSwapPageFromHome1057613019120130
fetchAndDisplaySwapQuotes2698268527101127072710
total2804276628403028272840
🌐 Dapp Page Load Benchmarks

Current Commit: 9832240 | Date: 3/12/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±42ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±40ms) 🟢 | historical mean value: 740ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±14ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 42ms 1.02s 1.33s 1.07s 1.33s
domContentLoaded 733ms 40ms 710ms 1.00s 761ms 1.00s
firstPaint 81ms 14ms 64ms 188ms 88ms 188ms
firstContentfulPaint 81ms 14ms 64ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 17.39 KiB (0.33%)
  • ui: -27.57 KiB (-0.32%)
  • common: 68.52 KiB (0.61%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 12, 2026

Builds ready [c5e2ad7]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account30528932515313325
total30528932515313325
Confirm Txconfirm_tx6035601560471360466047
total6035601560471360466047
Bridge User Actionsbridge_load_page25721330936280309
bridge_load_asset_picker23820527228271272
bridge_search_token75173076814755768
total1247122412651512531265
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14611234186312115221681
load1212100614889812451400
domContentLoaded120699914779712401393
domInteractive291891172677
firstPaint1437342768195242
backgroundConnect21619730116218243
firstReactRender20135562132
initialActions107124
loadScripts100679612599610391185
setupStore146119121423
numNetworkReqs362784173677
Power User HomeuiStartup5254215311304207365408499
load13091151179912913511577
domContentLoaded12911144178412513321546
domInteractive40202223437126
firstPaint2058951899263404
backgroundConnect18723078008174228474957
firstReactRender27185773041
initialActions402362313
loadScripts1062933149411310831300
setupStore1665081832
numNetworkReqs1365825340145242
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182211220221
srpButtonToSrpForm96969609696
confirmSrpToPwForm22222202222
pwFormToMetricsScreen16161601616
metricsToWalletReadyScreen17161811718
doneButtonToHomeScreen5975955982598598
openAccountMenuToAccountListLoaded2933291129702229282970
total388938833896538883896
Onboarding New WalletcreateWalletToSocialScreen2192192190219219
srpButtonToPwForm1061051081107108
createPwToRecoveryScreen889089
skipBackupToMetricsScreen35343603536
agreeButtonToOnboardingSuccess16151711717
doneButtonToAssetList50748552517525525
total89287091217912912
Asset DetailsassetClickToPriceChart9791103599103
total9791103599103
Solana Asset DetailsassetClickToPriceChart1054116546149165
total1054116546149165
Import Srp HomeloginToHomeScreen24092269255211425302552
openAccountMenuAfterLogin654696187396
homeAfterImportWithNewWallet1742609284893723352848
total42152947525993748655259
Send TransactionsopenSendPageFromHome31264063040
selectTokenToSendFormLoaded33244473444
reviewTransactionToConfirmationPage1141917136118413081361
total1221977144518513941445
SwapopenSwapPageFromHome1035517545133175
fetchAndDisplaySwapQuotes2701268927181127052718
total2804277028653628222865
🌐 Dapp Page Load Benchmarks

Current Commit: c5e2ad7 | Date: 3/12/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 961ms (±44ms) 🟢 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 675ms (±39ms) 🟢 | historical mean value: 740ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±15ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 961ms 44ms 935ms 1.31s 990ms 1.31s
domContentLoaded 675ms 39ms 653ms 988ms 705ms 988ms
firstPaint 75ms 15ms 60ms 216ms 84ms 216ms
firstContentfulPaint 75ms 15ms 60ms 216ms 84ms 216ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 17.39 KiB (0.33%)
  • ui: -28.06 KiB (-0.33%)
  • common: 68.52 KiB (0.61%)

@vinistevam vinistevam added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 18, 2026
@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Mar 19, 2026

Builds ready [8c3bbbe]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28626930111295301
total28626930111295301
Confirm Txconfirm_tx6040601560913060296091
total6040601560913060296091
Bridge User Actionsbridge_load_page25123426813264268
bridge_load_asset_picker26421431936282319
bridge_search_token75874477312770773
total1274122813002812971300
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup15111270181110515461754
load1247105515239612811428
domContentLoaded1241104915179412761417
domInteractive3318142252896
firstPaint1597547083212303
backgroundConnect22120828712225242
firstReactRender2213228212126
initialActions106123
loadScripts103583613129310671205
setupStore1564171725
numNetworkReqs393182154075
Power User HomeuiStartup5545243415079220564318232
load13401113197914513831641
domContentLoaded13181103193613813391611
domInteractive40191753433140
firstPaint2019349594270354
backgroundConnect194830011320201130784831
firstReactRender25154252735
initialActions104114
loadScripts1088892161712811121371
setupStore186216211832
numNetworkReqs21911834150252316
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202182222221222
srpButtonToSrpForm94929619596
confirmSrpToPwForm23222302323
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16161601616
doneButtonToHomeScreen6096056196606619
openAccountMenuToAccountListLoaded293129212937729372937
total3918389439512239253951
Onboarding New WalletcreateWalletToSocialScreen2182172191218219
srpButtonToPwForm1101091101110110
createPwToRecoveryScreen888088
skipBackupToMetricsScreen38383903939
agreeButtonToOnboardingSuccess16151711617
doneButtonToAssetList580471743124720743
total973863113512411161135
Asset DetailsassetClickToPriceChart68491011977101
total68491011977101
Solana Asset DetailsassetClickToPriceChart1111081142114114
total1111081142114114
Import Srp HomeloginToHomeScreen2341227924436223362443
openAccountMenuAfterLogin913314137112141
homeAfterImportWithNewWallet1643481263395423242633
total415629355476102847725476
Send TransactionsopenSendPageFromHome332351113051
selectTokenToSendFormLoaded31214693646
reviewTransactionToConfirmationPage1145848132920813201329
total1223920139219013801392
SwapopenSwapPageFromHome87721021189102
fetchAndDisplaySwapQuotes268426792686326862686
total2740267327753727652775
🌐 Dapp Page Load Benchmarks

Current Commit: 8c3bbbe | Date: 3/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±42ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±63ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 94ms (±129ms) 🟢 | historical mean value: 86ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 42ms 1.04s 1.38s 1.10s 1.38s
domContentLoaded 735ms 63ms 708ms 1.31s 765ms 1.31s
firstPaint 94ms 129ms 64ms 1.38s 92ms 1.38s
firstContentfulPaint 94ms 129ms 64ms 1.38s 92ms 1.38s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 55 Bytes (0%)
  • common: 20 Bytes (0%)

@vinistevam vinistevam added this pull request to the merge queue Mar 19, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 19, 2026
@vinistevam vinistevam added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit f8a01d8 Mar 19, 2026
205 of 206 checks passed
@vinistevam vinistevam deleted the vs/hide_cancel_speedup_for_7702 branch March 19, 2026 15:01
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2026
@metamaskbot metamaskbot added the release-13.24.0 Issue or pull request that will be included in release 13.24.0 label Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.24.0 Issue or pull request that will be included in release 13.24.0 size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants