Skip to content

feat: enforced simulations banner#40472

Draft
matthewwalsh0 wants to merge 8 commits intomainfrom
feat/enforced-simulations-banner
Draft

feat: enforced simulations banner#40472
matthewwalsh0 wants to merge 8 commits intomainfrom
feat/enforced-simulations-banner

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Feb 27, 2026

Description

Add an EnforcedSimulationsRow component to the transaction confirmations.

Add new shared eligibility utilities.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Manual testing steps

Screenshots/Recordings

Before

After

Banner

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.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Feb 27, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 27, 2026

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (11 files, +607 -99)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 info/
              • 📁 base-transaction-info/
                • 📄 base-transaction-info.tsx +2 -0
              • 📁 hooks/
                • 📄 useFeeCalculations.test.ts +3 -0
                • 📄 useFeeCalculations.ts +72 -10
              • 📁 native-transfer/
                • 📄 native-transfer.tsx +2 -0
              • 📁 token-transfer/
                • 📄 token-transfer.tsx +2 -0
          • 📁 rows/
            • 📁 enforced-simulations-row/
              • 📄 enforced-simulations-row.stories.tsx +107 -0
              • 📄 enforced-simulations-row.test.tsx +206 -0
              • 📄 enforced-simulations-row.tsx +212 -0
              • 📄 index.ts +1 -0
        • 📁 hooks/
          • 📁 transactions/
            • 📄 useIsEnforcedSimulationsSupported.test.ts +0 -67
            • 📄 useIsEnforcedSimulationsSupported.ts +0 -22

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 27, 2026

Builds ready [2f857c2]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2802732938278293
total2802732938278293
Confirm Txconfirm_tx606960656075460756075
total606960656075460756075
Bridge User Actionsbridge_load_page22818328139269281
bridge_load_asset_picker1981892026202202
bridge_search_token7036997073703707
total110110921115911031115
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14161202187310614501629
load1191101715699212151370
domContentLoaded1184101215629012111355
domInteractive3017106202582
firstPaint165681400143218270
backgroundConnect21119425712214236
firstReactRender20125172333
initialActions109124
loadScripts98980713609010171173
setupStore1474781632
numNetworkReqs312289192881
Power User HomeuiStartup19051440581458218442354
load11671038167814211611540
domContentLoaded11511031163913611521520
domInteractive37201762536105
firstPaint219761591210268316
backgroundConnect3842604038455306815
firstReactRender24164972540
initialActions106113
loadScripts94283014101349431318
setupStore1563451726
numNetworkReqs64391552469120
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192192190219219
srpButtonToSrpForm9795100298100
confirmSrpToPwForm23222302323
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen17161711717
doneButtonToHomeScreen62056868654684686
openAccountMenuToAccountListLoaded72756853784839076277848
total82697905892241385938922
Onboarding New WalletcreateWalletToSocialScreen2202182221222222
srpButtonToPwForm1121071236115123
createPwToRecoveryScreen99100910
skipBackupToMetricsScreen38354124041
agreeButtonToOnboardingSuccess17171701717
doneButtonToAssetList93089099138932991
total1309129513261313261326
Asset DetailsassetClickToPriceChart44405144451
total44405144451
Solana Asset DetailsassetClickToPriceChart47444824848
total47444824848
Import Srp HomeloginToHomeScreen1890184819795318831979
openAccountMenuAfterLogin47445024850
homeAfterImportWithNewWallet22562123244214024082442
total42224036442416343374424
Send TransactionsopenSendPageFromHome18171911919
selectTokenToSendFormLoaded20172322123
reviewTransactionToConfirmationPage86285188010866880
total90588691914919919
SwapopenSwapPageFromHome11610013914115139
fetchAndDisplaySwapQuotes56844640638681163866386
total58164755658783264966587
🌐 Dapp Page Load Benchmarks

Current Commit: 2f857c2 | Date: 2/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 959ms (±83ms) 🟢 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 680ms (±105ms) 🟢 | historical mean value: 735ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±86ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 959ms 83ms 923ms 1.74s 974ms 1.74s
domContentLoaded 680ms 105ms 644ms 1.70s 688ms 1.70s
firstPaint 83ms 86ms 64ms 940ms 84ms 940ms
firstContentfulPaint 83ms 86ms 64ms 940ms 84ms 940ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.11 KiB (0.02%)
  • ui: 5.62 KiB (0.07%)
  • common: 1.05 KiB (0.01%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 27, 2026

Builds ready [f96fbd7]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29627332820297328
total29627332820297328
Confirm Txconfirm_tx605260476057460526057
total605260476057460526057
Bridge User Actionsbridge_load_page26522731234299312
bridge_load_asset_picker23116027441266274
bridge_search_token7417287518743751
total1258123612701312661270
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14051178174811114441618
load11791007151510512101399
domContentLoaded1171985150710312061383
domInteractive3017127212579
firstPaint174691409150218315
backgroundConnect20819028715208237
firstReactRender19124262130
initialActions107124
loadScripts981788130810310151201
setupStore1466071624
numNetworkReqs312293202283
Power User HomeuiStartup209914709854111918994280
load11861028174915711881605
domContentLoaded11711019173515511791576
domInteractive3719190263788
firstPaint1857645786246334
backgroundConnect48326043546703151391
firstReactRender23164452434
initialActions1014213
loadScripts95681415271539501359
setupStore1674871828
numNetworkReqs67391612772124
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192172212221221
srpButtonToSrpForm93939419394
confirmSrpToPwForm22212202222
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16161601616
doneButtonToHomeScreen80960312482649831248
openAccountMenuToAccountListLoaded76827049806245280578062
total88658565907020990309070
Onboarding New WalletcreateWalletToSocialScreen2202182242220224
srpButtonToPwForm1091071101110110
createPwToRecoveryScreen989099
skipBackupToMetricsScreen39354334143
agreeButtonToOnboardingSuccess17161701617
doneButtonToAssetList67658176276740762
total107397511788311281178
Asset DetailsassetClickToPriceChart553677177077
total553677177077
Solana Asset DetailsassetClickToPriceChart362447104547
total362447104547
Import Srp HomeloginToHomeScreen20061876215311021102153
openAccountMenuAfterLogin42355474454
homeAfterImportWithNewWallet2145210522063821462206
total4281425142992242994299
Send TransactionsopenSendPageFromHome311940103940
selectTokenToSendFormLoaded20182112021
reviewTransactionToConfirmationPage85884987110864871
total91288793017924930
SwapopenSwapPageFromHome1201081319130131
fetchAndDisplaySwapQuotes4663457647276547254727
total4781470748445948334844
🌐 Dapp Page Load Benchmarks

Current Commit: f96fbd7 | Date: 2/27/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: 730ms (±40ms) 🟢 | historical mean value: 734ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±10ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 42ms 1.03s 1.35s 1.10s 1.35s
domContentLoaded 730ms 40ms 705ms 1.01s 759ms 1.01s
firstPaint 82ms 10ms 64ms 156ms 92ms 156ms
firstContentfulPaint 82ms 10ms 64ms 156ms 92ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.11 KiB (0.02%)
  • ui: 5.62 KiB (0.07%)
  • common: 1.26 KiB (0.01%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 27, 2026

Builds ready [3e3b778]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27626129211285292
total27626129211285292
Confirm Txconfirm_tx6080603361323661046132
total6080603361323661046132
Bridge User Actionsbridge_load_page24521929029269290
bridge_load_asset_picker1981972001200200
bridge_search_token7067037103705710
total112611221135511261135
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14931247199511915191691
load12511042171810812791442
domContentLoaded12431039168610512691426
domInteractive3217159252886
firstPaint1567143590221320
backgroundConnect22519837425226255
firstReactRender21144972239
initialActions107124
loadScripts1039835146410410651215
setupStore1464661725
numNetworkReqs312289192285
Power User HomeuiStartup284014579952189838525420
load12381039202717812731625
domContentLoaded12211030200017512541596
domInteractive42204344736115
firstPaint210811545172266378
backgroundConnect81125542519629592722
firstReactRender24175262633
initialActions104112
loadScripts1006830177917010291367
setupStore1664371835
numNetworkReqs79401502492123
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182201219220
srpButtonToSrpForm92909419394
confirmSrpToPwForm22212202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151601616
doneButtonToHomeScreen1224113212815612451281
openAccountMenuToAccountListLoaded69996196802368872588023
total84617800897750388698977
Onboarding New WalletcreateWalletToSocialScreen2212212210221221
srpButtonToPwForm1101081132112113
createPwToRecoveryScreen99100910
skipBackupToMetricsScreen38383803838
agreeButtonToOnboardingSuccess17171801818
doneButtonToAssetList1052556144037514391440
total14581003183636218361836
Asset DetailsassetClickToPriceChart42384634446
total42384634446
Solana Asset DetailsassetClickToPriceChart53485945659
total53485945659
Import Srp HomeloginToHomeScreen1958191420143619712014
openAccountMenuAfterLogin48445234852
homeAfterImportWithNewWallet22652046254719224382547
total42684062461322244514613
Send TransactionsopenSendPageFromHome291751143951
selectTokenToSendFormLoaded27204083540
reviewTransactionToConfirmationPage8528468605856860
total90489391910907919
SwapopenSwapPageFromHome1071041102108110
fetchAndDisplaySwapQuotes56024573639682662396396
total57064682650082263456500
🌐 Dapp Page Load Benchmarks

Current Commit: 3e3b778 | Date: 2/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±40ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 721ms (±38ms) 🟢 | historical mean value: 731ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±12ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 40ms 1.03s 1.33s 1.10s 1.33s
domContentLoaded 721ms 38ms 699ms 993ms 763ms 993ms
firstPaint 81ms 12ms 64ms 172ms 96ms 172ms
firstContentfulPaint 81ms 12ms 64ms 172ms 96ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 947 Bytes (0.02%)
  • ui: 5.63 KiB (0.07%)
  • common: 1.26 KiB (0.01%)

@matthewwalsh0 matthewwalsh0 changed the title feat: add enforced simulations row component and fee calculation feat: enforced simulations banner Mar 1, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
73.3% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 1, 2026

Builds ready [5e81027]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account31726638545327385
total31726638545327385
Confirm Txconfirm_tx6106604162067361856206
total6106604162067361856206
Bridge User Actionsbridge_load_page21117725326225253
bridge_load_asset_picker20918822414219224
bridge_search_token70769872913703729
total1123109911702811121170
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup13641122169311514241588
load114594013769711961325
domContentLoaded113893713719611871308
domInteractive2716136202377
firstPaint190631224191204341
backgroundConnect19717823612203224
firstReactRender19124462030
initialActions1012224
loadScripts95775211839410081123
setupStore1364261424
numNetworkReqs3122113212288
Power User HomeuiStartup17621415287118818012143
load11741053192315411561585
domContentLoaded11591046191215011431553
domInteractive3620157243588
firstPaint1838143881243316
backgroundConnect30126339423311344
firstReactRender24156182539
initialActions106112
loadScripts94083816661489241336
setupStore1584161729
numNetworkReqs60391522560125
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2212192222222222
srpButtonToSrpForm95949719697
confirmSrpToPwForm22212202222
pwFormToMetricsScreen15151601616
metricsToWalletReadyScreen16151811718
doneButtonToHomeScreen996595126325612381263
openAccountMenuToAccountListLoaded74437025785633678277856
total88128633901513388829015
Onboarding New WalletcreateWalletToSocialScreen2202182211220221
srpButtonToPwForm1071071080107108
createPwToRecoveryScreen889089
skipBackupToMetricsScreen36343713637
agreeButtonToOnboardingSuccess16161701717
doneButtonToAssetList779476119027410151190
total1167864157527414091575
Asset DetailsassetClickToPriceChart533678197578
total533678197578
Solana Asset DetailsassetClickToPriceChart47464814748
total47464814748
Import Srp HomeloginToHomeScreen1994188120847820762084
openAccountMenuAfterLogin47445234952
homeAfterImportWithNewWallet22132108237510522962375
total42544048442414043604424
Send TransactionsopenSendPageFromHome18171911919
selectTokenToSendFormLoaded20192112021
reviewTransactionToConfirmationPage86784392131855921
total90388295932887959
SwapopenSwapPageFromHome1201161233121123
fetchAndDisplaySwapQuotes4591456646312545884631
total4732467548466347544846
🌐 Dapp Page Load Benchmarks

Current Commit: 5e81027 | Date: 3/1/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±41ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 744ms (±38ms) 🟢 | historical mean value: 739ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±12ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 41ms 1.03s 1.36s 1.08s 1.36s
domContentLoaded 744ms 38ms 716ms 1.03s 767ms 1.03s
firstPaint 83ms 12ms 68ms 188ms 92ms 188ms
firstContentfulPaint 83ms 12ms 68ms 188ms 92ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.19 KiB (0.02%)
  • ui: -8.03 KiB (-0.1%)
  • common: 6.39 KiB (0.06%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-XL team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants