Skip to content

Conversation

@vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Nov 26, 2025

Description

This PR fixes an issue where the insufficient gas critical alert briefly appears and then disappears once gas-station checks determine that the transaction can be paid with a token.
Previously, the UI would render the alert immediately and replace it a moment later, causing a flicker.

With this update, the insufficient balance alert is held back until gas-station checks fully complete.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Fixed a flicker where the insufficient balance alert appeared before gas-station checks completed

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/6210

Manual testing steps

  1. Have no ETH on Base but have balance in stables
  2. Start a send
  3. Get to the confirmation
  4. Notice the flickering on the gas UI

Screenshots/Recordings

true-alert.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

Defers the insufficient balance alert until gasless support checks finish by introducing a pending state and a new useHasInsufficientBalance hook, updating related hooks and tests.

  • Confirmations:
    • Alerts: Refactor useInsufficientBalanceAlerts to use useHasInsufficientBalance and gate alerts on gasless check completion (pending) and simulation results to prevent flicker.
    • Gasless Support: useIsGaslessSupported now returns pending; useIsGaslessLoading and useAutomaticGasFeeTokenSelect respect pending and use useHasInsufficientBalance.
    • New Hook: Add useHasInsufficientBalance to centralize balance/fee sufficiency and nativeCurrency lookup.
  • Tests:
    • Update tests across footer, gas-fee token modal/selector, alerts, gasless loading/support, auto-select, and transaction confirm to include pending handling and new hook usage.

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

@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Nov 26, 2025
@github-actions
Copy link
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.

@metamaskbot
Copy link
Collaborator

metamaskbot commented Nov 26, 2025

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (14 files, +296 -94)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 footer/
              • 📄 footer.test.tsx +2 -0
            • 📁 info/
              • 📁 shared/
                • 📁 gas-fee-token-modal/
                  • 📄 gas-fee-token-modal.test.tsx +2 -0
                • 📁 selected-gas-fee-token/
                  • 📄 selected-gas-fee-token.test.tsx +3 -1
        • 📁 hooks/
          • 📁 alerts/
            • 📁 transactions/
              • 📄 useInsufficientBalanceAlerts.test.ts +2 -0
              • 📄 useInsufficientBalanceAlerts.ts +28 -57
          • 📁 gas/
            • 📄 useIsGaslessLoading.test.ts +8 -4
            • 📄 useIsGaslessLoading.ts +7 -5
            • 📄 useIsGaslessSupported.test.ts +7 -0
            • 📄 useIsGaslessSupported.ts +14 -9
          • 📁 transactions/
            • 📄 useTransactionConfirm.test.ts +9 -0
            • 📄 useAutomaticGasFeeTokenSelect.test.ts +24 -11
            • 📄 useAutomaticGasFeeTokenSelect.ts +10 -7
            • 📄 useHasInsufficientBalance.test.ts +120 -0
            • 📄 useHasInsufficientBalance.ts +60 -0

🔐 @MetaMask/web3auth (1 files, +2 -0)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 footer/
              • 📄 footer.test.tsx +2 -0

@vinistevam vinistevam changed the title Fix: prevent flickering of insufficient balance alert until gas station checks complete fix: prevent flickering of insufficient balance alert until gas station checks complete Nov 26, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [9cacf14]
UI Startup Metrics (1366 ± 129 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13661103170612914281622
load107387313219711221258
domContentLoaded106686413179711161250
domInteractive28151192423104
firstPaint55183131041310401179
backgroundConnect22520627614234253
firstReactRender412568114863
getState72162033680140
initialActions105113
loadScripts8496621086958991047
setupStore1477181726
numNetworkReqs41281523431143
BrowserifyPower User HomeuiStartup21001789279522321992634
load1018900155912610211360
domContentLoaded1003893155212710131354
domInteractive33171572731123
firstPaint54410915703979571243
backgroundConnect25320271495235517
firstReactRender904614323106130
getState18213129731199235
initialActions105112
loadScripts79667713421277971155
setupStore22750102644
numNetworkReqs102632855295266
WebpackStandard HomeuiStartup90577112601119181200
load65758190382662864
domContentLoaded65257889781658856
domInteractive2817133232393
firstPaint248109861164228661
backgroundConnect145174191329
firstReactRender4121153234378
getState61181393087112
initialActions109112
loadScripts64957688779656846
setupStore1464781540
numNetworkReqs41281503430144
WebpackPower User HomeuiStartup17291304223324019392139
load68058696685692894
domContentLoaded67058096286682887
domInteractive36171643132126
firstPaint28889894201336701
backgroundConnect79859715436561
firstReactRender944616123111134
getState1708422222183206
initialActions104112
loadScripts66757795284680879
setupStore20660122348
numNetworkReqs103653015899278
FirefoxBrowserifyStandard HomeuiStartup13941163177114414681674
load106691513749211151251
domContentLoaded106591413749311151250
domInteractive62301393087113
firstPaint------
backgroundConnect58242163862154
firstReactRender26195372844
getState231192112441
initialActions203122
loadScripts103789813068610841229
setupStore258103192380
numNetworkReqs39281222632120
BrowserifyPower User HomeuiStartup27572044477444629183596
load1170994247420511791575
domContentLoaded1169992247320511791575
domInteractive13035600111121420
firstPaint------
backgroundConnect152301162174141539
firstReactRender90412352798131
getState30877966219402765
initialActions217123
loadScripts1126972164215711391502
setupStore17415740183241643
numNetworkReqs102623156382242
WebpackStandard HomeuiStartup16381397230919117172021
load12671114164210613311474
domContentLoaded12671114164110613271473
domInteractive63281883589123
firstPaint------
backgroundConnect63193444667148
firstReactRender31226873543
getState33102033727131
initialActions205123
loadScripts1240109814989813021450
setupStore259208302290
numNetworkReqs40281292738121
WebpackPower User HomeuiStartup30482158541378232074843
load14931159281142615682595
domContentLoaded14931159281042615682595
domInteractive12132926148102451
firstPaint------
backgroundConnect178321204236149988
firstReactRender90383204392215
getState29468909229459785
initialActions4164837
loadScripts14191118279035915322401
setupStore1458848179164620
numNetworkReqs100603276180252
📊 Page Load Benchmark Results

Current Commit: 9cacf14 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±48ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 745ms (±45ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±14ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 48ms 1.04s 1.45s 1.10s 1.45s
domContentLoaded 745ms 45ms 724ms 1.11s 770ms 1.11s
firstPaint 81ms 14ms 64ms 208ms 92ms 208ms
firstContentfulPaint 81ms 14ms 64ms 208ms 92ms 208ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.5 KiB (0.03%)
  • ui: 863 Bytes (0.01%)
  • common: 1.66 KiB (0.02%)

@metamaskbot
Copy link
Collaborator

Builds ready [6803f1d]
UI Startup Metrics (1312 ± 124 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13121051168912413611565
load1038849133110210851241
domContentLoaded1032844132510110801229
domInteractive2614108212288
firstPaint58094134640510261222
backgroundConnect21718928415224245
firstReactRender4025125154461
getState65271572881124
initialActions104114
loadScripts8236511117998481031
setupStore1473161725
numNetworkReqs41271473330142
BrowserifyPower User HomeuiStartup22441812297827124282717
load1009875146213310011367
domContentLoaded99586914531349891361
domInteractive37172484130145
firstPaint5179714703779481127
backgroundConnect25019456585231519
firstReactRender924515624110129
getState19612967277209267
initialActions107112
loadScripts79066612511347801149
setupStore21762112346
numNetworkReqs1386736970184286
WebpackStandard HomeuiStartup87472813361118991131
load645568109490680835
domContentLoaded640562108789676830
domInteractive2716108232296
firstPaint23682722160218613
backgroundConnect952741117
firstReactRender4022364373984
getState5013101236894
initialActions104112
loadScripts637560107788674821
setupStore155100121641
numNetworkReqs41271463430142
WebpackPower User HomeuiStartup18341340237823519792256
load68458999086692926
domContentLoaded67458198587681921
domInteractive35181442732113
firstPaint284101805178321669
backgroundConnect69863415022550
firstReactRender934514122111127
getState18012674561187220
initialActions103112
loadScripts67157997686679912
setupStore211057132450
numNetworkReqs1477040974199292
FirefoxBrowserifyStandard HomeuiStartup14201181192817315171795
load106991613118711221221
domContentLoaded106891213118711221221
domInteractive62312373684125
firstPaint------
backgroundConnect62303314766169
firstReactRender271862102952
getState22116592338
initialActions206123
loadScripts104090212698010931188
setupStore258181252280
numNetworkReqs39281262632119
BrowserifyPower User HomeuiStartup27382186394135228953503
load1174978171914611711564
domContentLoaded1173978171914611701564
domInteractive13638564109130438
firstPaint------
backgroundConnect15135663117139435
firstReactRender894314320102122
getState278731145208300757
initialActions318136
loadScripts1137952163613711301509
setupStore17519842201195697
numNetworkReqs102593206879310
WebpackStandard HomeuiStartup16371369211017317222000
load12771086155310513421479
domContentLoaded12761086155310513421479
domInteractive60262243581133
firstPaint------
backgroundConnect68211944079186
firstReactRender32218193648
getState268152222662
initialActions206123
loadScripts1248107115009613171435
setupStore29101763427135
numNetworkReqs41281272737123
WebpackPower User HomeuiStartup32072328824988932504946
load15681102621965915942845
domContentLoaded15671102621965915942845
domInteractive200324948527104982
firstPaint------
backgroundConnect158271296228124973
firstReactRender92402803896211
getState28274851219383794
initialActions3153527
loadScripts14961079619361215652616
setupStore12961007173137540
numNetworkReqs102633036181240
📊 Page Load Benchmark Results

Current Commit: 6803f1d | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 714ms (±35ms) 🟢 | historical mean value: 719ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1000ms 1.31s 1.06s 1.31s
domContentLoaded 714ms 35ms 693ms 974ms 736ms 974ms
firstPaint 75ms 12ms 60ms 180ms 84ms 180ms
firstContentfulPaint 75ms 12ms 60ms 180ms 84ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.5 KiB (0.03%)
  • ui: 872 Bytes (0.01%)
  • common: 1.66 KiB (0.02%)

@vinistevam vinistevam marked this pull request as ready for review November 26, 2025 14:59
@vinistevam vinistevam requested review from a team as code owners November 26, 2025 14:59
@metamaskbot
Copy link
Collaborator

Builds ready [4bc9c12]
UI Startup Metrics (1304 ± 118 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13041056164811813691513
load103684613849810911225
domContentLoaded103083713769710831216
domInteractive2615109212184
firstPaint59188138441210271224
backgroundConnect21019024811214236
firstReactRender382271104257
getState60221692767125
initialActions108114
loadScripts826645118595868999
setupStore1463461625
numNetworkReqs41281493430143
BrowserifyPower User HomeuiStartup23511832305031425692931
load1076941156113810701494
domContentLoaded1060921155113710531478
domInteractive40172594234163
firstPaint696110157243210351406
backgroundConnect276207764117247563
firstReactRender71481241675112
getState19613670059212250
initialActions106112
loadScripts83971413311368271255
setupStore241162112946
numNetworkReqs1387034967184300
WebpackStandard HomeuiStartup86472612681128961126
load63956188384678832
domContentLoaded63555887683674827
domInteractive2714120232295
firstPaint23884801168210609
backgroundConnect1055971123
firstReactRender3420110143656
getState52161152768108
initialActions106112
loadScripts63255686781672818
setupStore17555121742
numNetworkReqs41281503430143
WebpackPower User HomeuiStartup18361281281129520302286
load6965901236111695981
domContentLoaded6865841228112686976
domInteractive40172253739145
firstPaint33388990219512717
backgroundConnect55765013021499
firstReactRender6546110127187
getState19213874097185225
initialActions103112
loadScripts6835821219110683968
setupStore22965132453
numNetworkReqs1566841472202305
FirefoxBrowserifyStandard HomeuiStartup15621225258521216771941
load1157956149412012591389
domContentLoaded1155956149412112581389
domInteractive69321983691134
firstPaint------
backgroundConnect68222353881154
firstReactRender301858103257
getState3710913922762
initialActions205123
loadScripts1121942141011012051354
setupStore3282323130103
numNetworkReqs41281252641123
BrowserifyPower User HomeuiStartup26402064382732927893442
load1177940166415811861590
domContentLoaded1176940166415811861590
domInteractive13136573112115435
firstPaint------
backgroundConnect1343250391154401
firstReactRender6140103116585
getState289711034198385704
initialActions218123
loadScripts1141921163215511451542
setupStore20913773221197722
numNetworkReqs101613236280242
WebpackStandard HomeuiStartup16201369215616417071892
load12671115157711213311513
domContentLoaded12661115157711213311512
domInteractive54271432971127
firstPaint------
backgroundConnect62182153374131
firstReactRender3521105153768
getState2410163202353
initialActions204123
loadScripts12381098153310113051449
setupStore2992473623106
numNetworkReqs41281272838124
WebpackPower User HomeuiStartup29692130503366630544476
load14711177289639914452663
domContentLoaded14701176289539914452663
domInteractive12532990153103436
firstPaint------
backgroundConnect140401159169143352
firstReactRender63431952065106
getState26876825210353777
initialActions5110114327
loadScripts14221151284737014042518
setupStore1447633168160575
numNetworkReqs101573196381247
📊 Page Load Benchmark Results

Current Commit: 4bc9c12 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±72ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±69ms) 🟢 | historical mean value: 720ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 72ms 1.00s 1.32s 1.27s 1.32s
domContentLoaded 733ms 69ms 694ms 1.00s 934ms 1.00s
firstPaint 76ms 10ms 60ms 156ms 84ms 156ms
firstContentfulPaint 76ms 10ms 60ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.5 KiB (0.03%)
  • ui: 1.06 KiB (0.02%)
  • common: 1.69 KiB (0.02%)

@vinistevam vinistevam force-pushed the vs/flickering-gas-station branch from 4bc9c12 to b06d058 Compare November 26, 2025 15:37
@metamaskbot
Copy link
Collaborator

Builds ready [88dd0a6]
UI Startup Metrics (1296 ± 124 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12961054170112413801507
load104085913239610861220
domContentLoaded103485512989410791212
domInteractive2614107232194
firstPaint53988133240910021218
backgroundConnect21619426113224241
firstReactRender35216983852
getState57211502469108
initialActions106114
loadScripts8246561079918721010
setupStore1373961425
numNetworkReqs41271463330142
BrowserifyPower User HomeuiStartup22391679307328624032832
load1020875158415010121443
domContentLoaded100687115651509951423
domInteractive37171763534143
firstPaint51310515564059411353
backgroundConnect274206736128238610
firstReactRender6344121136987
getState18713766258198251
initialActions103112
loadScripts79867313391487931214
setupStore20105592442
numNetworkReqs1446738770183294
WebpackStandard HomeuiStartup86073214701148691141
load63556494983662834
domContentLoaded63155994083657828
domInteractive2616109222191
firstPaint24184818173213634
backgroundConnect95293915
firstReactRender3721184253887
getState5224132246997
initialActions107112
loadScripts62855793081655820
setupStore16671121542
numNetworkReqs41271493430142
WebpackPower User HomeuiStartup18591308259826020372282
load6805841277118673956
domContentLoaded6705781269118664950
domInteractive36171603034115
firstPaint322951284247400895
backgroundConnect112764420326611
firstReactRender6445114106881
getState18012773575180224
initialActions1010112
loadScripts6675761260117662942
setupStore228116162355
numNetworkReqs1586740477199359
FirefoxBrowserifyStandard HomeuiStartup13721161224517614291734
load1055928154010010961269
domContentLoaded1053922154010010961269
domInteractive60331463090108
firstPaint------
backgroundConnect59232404167130
firstReactRender271866103051
getState2310100142258
initialActions204123
loadScripts102991315139210611197
setupStore259167272195
numNetworkReqs39281252732121
BrowserifyPower User HomeuiStartup26492012423142628413510
load1164918241823311671552
domContentLoaded1163911241823411671552
domInteractive12634517102119425
firstPaint------
backgroundConnect1282474693139283
firstReactRender6139107156499
getState31778944234383903
initialActions207123
loadScripts1129901228721811411517
setupStore15416714176147594
numNetworkReqs101523266580245
WebpackStandard HomeuiStartup16331357223019617522049
load12721117163512113391518
domContentLoaded12721117163412113391517
domInteractive56233053880117
firstPaint------
backgroundConnect61211963465153
firstReactRender321998103652
getState34132013927145
initialActions205123
loadScripts12471100159911613111482
setupStore30101663032108
numNetworkReqs41281252741121
WebpackPower User HomeuiStartup29772328548270229794656
load14831144301646514272854
domContentLoaded14821143301646514272854
domInteractive13531101817799419
firstPaint------
backgroundConnect150271295214145308
firstReactRender68411963267179
getState272661025203301716
initialActions4044637
loadScripts14141118299339313882666
setupStore1437815188144702
numNetworkReqs100522475595237
📊 Page Load Benchmark Results

Current Commit: 88dd0a6 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 711ms (±38ms) 🟢 | historical mean value: 720ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 74ms (±15ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 40ms 998ms 1.34s 1.06s 1.34s
domContentLoaded 711ms 38ms 691ms 1.01s 731ms 1.01s
firstPaint 74ms 15ms 56ms 204ms 84ms 204ms
firstContentfulPaint 74ms 15ms 56ms 204ms 84ms 204ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 797 Bytes (0.01%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [cd63bd9]
UI Startup Metrics (1320 ± 119 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13201047164111913891521
load104885112769710971224
domContentLoaded104284512739610931205
domInteractive2714145242292
firstPaint54382124841210371206
backgroundConnect21719827614222245
firstReactRender402573114565
getState65241653174135
initialActions108225
loadScripts833653104592879994
setupStore1463471729
numNetworkReqs41281493330139
BrowserifyPower User HomeuiStartup21231587283429423012690
load96483215591599511403
domContentLoaded95082615491609371396
domInteractive33162183428123
firstPaint6608414443629081148
backgroundConnect22718166185213515
firstReactRender5942109116676
getState18614232130199247
initialActions102112
loadScripts76264813521567461214
setupStore1985492139
numNetworkReqs1556941375183356
WebpackStandard HomeuiStartup8607251174958781083
load63556684373663822
domContentLoaded63056183672659815
domInteractive2715103222297
firstPaint23887824169233626
backgroundConnect1053451020
firstReactRender3622128193692
getState49181052361101
initialActions104112
loadScripts62855982871657807
setupStore16658121944
numNetworkReqs41281453331140
WebpackPower User HomeuiStartup16261273267626418642130
load6755821281108671917
domContentLoaded6665761273109665912
domInteractive36181493131129
firstPaint28398885184337689
backgroundConnect85760816621555
firstReactRender624796106782
getState17612863969179205
initialActions103112
loadScripts6635741262108663904
setupStore21754122250
numNetworkReqs1196634066121307
FirefoxBrowserifyStandard HomeuiStartup13961146174114515031706
load105991413048711101240
domContentLoaded105890913048811101240
domInteractive57311342782115
firstPaint------
backgroundConnect62223234871177
firstReactRender281866103251
getState2510177202552
initialActions203123
loadScripts103189912857710841181
setupStore248181232253
numNetworkReqs40281272733118
BrowserifyPower User HomeuiStartup26061950425748627624089
load1154917248425911421587
domContentLoaded1153912248425911421587
domInteractive12231512107110399
firstPaint------
backgroundConnect134291094151140358
firstReactRender6037152196396
getState29567900217398816
initialActions2038423
loadScripts1110904235122711101448
setupStore17114796210177736
numNetworkReqs102603076279241
WebpackStandard HomeuiStartup16791384237520417872168
load13031113163912113551588
domContentLoaded13021112163912113541588
domInteractive67281773797143
firstPaint------
backgroundConnect66222844166139
firstReactRender342186103951
getState299260322591
initialActions204123
loadScripts12721096161210913311506
setupStore3492474127141
numNetworkReqs41291272836125
WebpackPower User HomeuiStartup30632284599683730174871
load15281181332249015522879
domContentLoaded15281180332149015522878
domInteractive130301182169106422
firstPaint------
backgroundConnect153251549205150303
firstReactRender65422102766117
getState28380937213396790
initialActions2133327
loadScripts14771153315744314742779
setupStore1797989229215668
numNetworkReqs996330555101238
📊 Page Load Benchmark Results

Current Commit: cd63bd9 | Date: 11/26/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±36ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 38ms 1.00s 1.31s 1.06s 1.31s
domContentLoaded 723ms 36ms 693ms 982ms 740ms 982ms
firstPaint 77ms 11ms 56ms 176ms 84ms 176ms
firstContentfulPaint 77ms 11ms 56ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 75 Bytes (0%)
  • ui: 1.43 KiB (0.02%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [1aa1730]
UI Startup Metrics (1326 ± 123 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13261115178412314041570
load1072881145811011381268
domContentLoaded1065875145010811311253
domInteractive3016172272394
firstPaint56992131343010731259
backgroundConnect22220226612227244
firstReactRender38247294356
getState65201452580114
initialActions108114
loadScripts84967012141069111042
setupStore1462751824
numNetworkReqs41281483330139
BrowserifyPower User HomeuiStartup------
load------
domContentLoaded------
domInteractive------
firstPaint------
backgroundConnect------
firstReactRender------
getState------
initialActions------
loadScripts------
setupStore------
numNetworkReqs------
WebpackStandard HomeuiStartup88573811901059361129
load64757790078660859
domContentLoaded64157289377652854
domInteractive29161622823104
firstPaint22789827142226594
backgroundConnect1164051219
firstReactRender3922178224376
getState51141352664107
initialActions106113
loadScripts63857088475650845
setupStore166101121929
numNetworkReqs41281443331140
WebpackPower User HomeuiStartup17801409255825820242205
load7005861128100705964
domContentLoaded6905801118100693956
domInteractive39191533041126
firstPaint3051021126221355768
backgroundConnect115966220137586
firstReactRender6547115117287
getState19313070492190259
initialActions103012
loadScripts687578110998690947
setupStore21853112548
numNetworkReqs1687038973209339
FirefoxBrowserifyStandard HomeuiStartup14801233217118815771871
load1121974143210811761346
domContentLoaded1120974143210811761345
domInteractive60281943587128
firstPaint------
backgroundConnect76222615493244
firstReactRender301972113554
getState261299132950
initialActions207123
loadScripts1088958140310111501313
setupStore2710164252681
numNetworkReqs40281282734120
BrowserifyPower User HomeuiStartup25091899441534226693151
load1156973174714611761508
domContentLoaded1156973174614611761507
domInteractive12837579112114441
firstPaint------
backgroundConnect1172845369134242
firstReactRender6041127156193
getState25939849208256793
initialActions208136
loadScripts1120956170413811241457
setupStore15110760178157679
numNetworkReqs100593206178244
WebpackStandard HomeuiStartup16961413238020417642160
load13181133174412613761583
domContentLoaded13181132174312713761583
domInteractive64281743388120
firstPaint------
backgroundConnect77202444695173
firstReactRender32227283646
getState3293134327156
initialActions206123
loadScripts12871118171511613511538
setupStore269201292296
numNetworkReqs41281312737121
WebpackPower User HomeuiStartup29852352548469731254789
load14251135275230214151853
domContentLoaded14251134275230214141852
domInteractive11629521115101474
firstPaint------
backgroundConnect143281022148152361
firstReactRender67412843366125
getState322491459259469830
initialActions3073726
loadScripts13831111262228213691826
setupStore17391062231181700
numNetworkReqs101612545882237
📊 Page Load Benchmark Results

Current Commit: 1aa1730 | Date: 11/27/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±37ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 713ms (±34ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 37ms 997ms 1.29s 1.05s 1.29s
domContentLoaded 713ms 34ms 691ms 961ms 729ms 961ms
firstPaint 75ms 12ms 60ms 176ms 84ms 176ms
firstContentfulPaint 75ms 12ms 60ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 69 Bytes (0%)
  • ui: 754.98 KiB (10.71%)
  • common: 40.48 KiB (0.46%)

@vinistevam vinistevam force-pushed the vs/flickering-gas-station branch from 1aa1730 to cd63bd9 Compare November 27, 2025 14:54
@metamaskbot
Copy link
Collaborator

Builds ready [cd63bd9]
UI Startup Metrics (1271 ± 114 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12711049164611413321507
load103487112929510771246
domContentLoaded102886812869410731232
domInteractive2715102202481
firstPaint54183130340510131213
backgroundConnect2151962389220233
firstReactRender35245783954
getState62271942871128
initialActions107114
loadScripts8196601072928551026
setupStore1353361526
numNetworkReqs41271483330142
BrowserifyPower User HomeuiStartup20761792296023721612506
load1042889164213910641371
domContentLoaded1027878161813810491356
domInteractive33181422432104
firstPaint5479116464379801368
backgroundConnect255201732101235541
firstReactRender5842111116277
getState17913227525192232
initialActions103112
loadScripts81767913951378061148
setupStore21106892439
numNetworkReqs102662875197246
WebpackStandard HomeuiStartup85872311491028871085
load63356485270664802
domContentLoaded62955884669659794
domInteractive251596212091
firstPaint21683811145216672
backgroundConnect1153771328
firstReactRender3821170223896
getState4720188256094
initialActions104112
loadScripts62655783868657785
setupStore175206221844
numNetworkReqs41281453331141
WebpackPower User HomeuiStartup17391358250427119882228
load696602108296704960
domContentLoaded685595106896691950
domInteractive37181543135132
firstPaint268891088184263662
backgroundConnect123867420990602
firstReactRender6545108117085
getState17313125822185214
initialActions104112
loadScripts682593105794689940
setupStore238100142451
numNetworkReqs1637039670203346
FirefoxBrowserifyStandard HomeuiStartup14341181197217915131782
load1110969163612411761361
domContentLoaded1110968163612411751361
domInteractive62321873390124
firstPaint------
backgroundConnect60301863168138
firstReactRender28185693250
getState228138142338
initialActions205122
loadScripts1084953157311811501326
setupStore258191262273
numNetworkReqs39281262733121
BrowserifyPower User HomeuiStartup25871969468043327323520
load11551006180115011631511
domContentLoaded11551006180115011591511
domInteractive12234586111115429
firstPaint------
backgroundConnect12628701103131340
firstReactRender563598135990
getState28661884201368735
initialActions2135323
loadScripts1120989177614711171475
setupStore18811860207217732
numNetworkReqs100612455977241
WebpackStandard HomeuiStartup16411381219117917312009
load12821079162512313491549
domContentLoaded12821079162512313481549
domInteractive64281783789133
firstPaint------
backgroundConnect69272303880142
firstReactRender30215163544
getState279172262592
initialActions203122
loadScripts12541060160411813221510
setupStore24996192268
numNetworkReqs40281272636119
WebpackPower User HomeuiStartup29182182468158230564453
load14431186286330014311863
domContentLoaded14421186286330014311862
domInteractive11432515107101406
firstPaint------
backgroundConnect135291451165141250
firstReactRender64411942165101
getState28351844206354788
initialActions213123
loadScripts13991165275028213811808
setupStore18471068239196723
numNetworkReqs100603015880237
📊 Page Load Benchmark Results

Current Commit: cd63bd9 | Date: 11/27/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±108ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 725ms (±106ms) 🟢 | historical mean value: 723ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±85ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 108ms 1.00s 2.07s 1.05s 2.07s
domContentLoaded 725ms 106ms 693ms 1.75s 734ms 1.75s
firstPaint 85ms 85ms 60ms 932ms 84ms 932ms
firstContentfulPaint 85ms 85ms 60ms 932ms 84ms 932ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 69 Bytes (0%)
  • ui: 754.98 KiB (10.71%)
  • common: 40.48 KiB (0.46%)

@metamaskbot
Copy link
Collaborator

Builds ready [174348d]
UI Startup Metrics (1240 ± 114 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12401017160911413141434
load103285913759410791207
domContentLoaded102685413689310731203
domInteractive251593192081
firstPaint4589113853778961190
backgroundConnect22119925713230247
firstReactRender321997123658
getState3515105154066
initialActions106113
loadScripts811654114692845989
setupStore1263451323
numNetworkReqs1257720572
BrowserifyPower User HomeuiStartup21011693316426222682614
load1031891171815010181396
domContentLoaded1017882170715110061386
domInteractive38181763238137
firstPaint57114617184139621410
backgroundConnect252204697101231570
firstReactRender5740100116281
getState209135726105210277
initialActions104112
loadScripts80968114621497931179
setupStore21896122543
numNetworkReqs1516938870196319
WebpackStandard HomeuiStartup824690110084860991
load63555287865657788
domContentLoaded63054887165654783
domInteractive2614107212192
firstPaint20689693121205628
backgroundConnect1053361226
firstReactRender2819126123140
getState281390143554
initialActions104112
loadScripts62754686363652774
setupStore1162641420
numNetworkReqs1257420571
WebpackPower User HomeuiStartup16501283240226119172131
load6845861201111680974
domContentLoaded6745801191111669957
domInteractive36171683332131
firstPaint2861081202216259793
backgroundConnect61863314319521
firstReactRender60448486676
getState199131727115188675
initialActions103112
loadScripts6715781180109667948
setupStore21753122247
numNetworkReqs1636740271207327
FirefoxBrowserifyStandard HomeuiStartup12271076187613312851488
load101893112487210691171
domContentLoaded101793112477210691171
domInteractive54301703075117
firstPaint------
backgroundConnect42203154137107
firstReactRender22174562336
getState156190251150
initialActions102112
loadScripts99291612086010391099
setupStore106467929
numNetworkReqs1156615653
BrowserifyPower User HomeuiStartup26622000442547727594044
load11771008252019511871530
domContentLoaded11771008251919511871530
domInteractive12036540113107460
firstPaint------
backgroundConnect150281987225149410
firstReactRender6036123186398
getState28671910208397757
initialActions208127
loadScripts1138987239018211411463
setupStore18810810209240683
numNetworkReqs101573196278242
WebpackStandard HomeuiStartup14581241185313915551773
load1214105115459912841405
domContentLoaded1213105115449912841405
domInteractive52262413578110
firstPaint------
backgroundConnect43191682641108
firstReactRender272085122650
getState126188181116
initialActions102012
loadScripts1190103115179612611353
setupStore156108171249
numNetworkReqs1156415762
WebpackPower User HomeuiStartup29662019588578831594679
load14231172282433915172442
domContentLoaded14221172282333915172442
domInteractive1113052911394422
firstPaint------
backgroundConnect143401170189127398
firstReactRender67402503566132
getState325311255284461882
initialActions213123
loadScripts13571141264626414471773
setupStore1135799165102560
numNetworkReqs100612485594239
📊 Page Load Benchmark Results

Current Commit: 174348d | Date: 11/28/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±141ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±138ms) 🟢 | historical mean value: 720ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 87ms (±118ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 141ms 1.01s 2.42s 1.08s 2.42s
domContentLoaded 735ms 138ms 698ms 2.09s 754ms 2.09s
firstPaint 87ms 118ms 56ms 1.26s 88ms 1.26s
firstContentfulPaint 87ms 118ms 56ms 1.26s 88ms 1.26s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 993 Bytes (0.01%)
  • common: 20 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [ba4bac1]
UI Startup Metrics (1253 ± 99 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1253104014679913231433
load104786912648811041213
domContentLoaded104086612578710951205
domInteractive2515123192283
firstPaint52083123641110301153
backgroundConnect21819726613226252
firstReactRender3220121133557
getState4016158234796
initialActions104113
loadScripts830660103885880992
setupStore1373251523
numNetworkReqs1056916559
BrowserifyPower User HomeuiStartup20791784277524022612503
load1039877161714210951375
domContentLoaded1027868160314210791366
domInteractive3117105203084
firstPaint48810816203699281200
backgroundConnect277204820148241732
firstReactRender5640421385679
getState20313971980214311
initialActions106112
loadScripts81567012291308641109
setupStore188141171634
numNetworkReqs78631512274143
WebpackStandard HomeuiStartup833719133985849994
load642572104276656809
domContentLoaded638569103575651804
domInteractive29171322523107
firstPaint20798839128207590
backgroundConnect1063151121
firstReactRender30206473341
getState271359103547
initialActions105113
loadScripts635567102573649795
setupStore1172131317
numNetworkReqs1157417562
WebpackPower User HomeuiStartup15971236222826317812132
load68258795897709920
domContentLoaded67457994997702912
domInteractive33181412631109
firstPaint30696955214342835
backgroundConnect89761717621557
firstReactRender584496106381
getState18314332328195234
initialActions103112
loadScripts67157794195701910
setupStore17663111547
numNetworkReqs79642563173150
FirefoxBrowserifyStandard HomeuiStartup13331071193015714341622
load1097915147011011701308
domContentLoaded1096914146511011681307
domInteractive62312003685136
firstPaint------
backgroundConnect49223674344120
firstReactRender24185562437
getState156143201177
initialActions103012
loadScripts1066896144310011191266
setupStore12581101232
numNetworkReqs1156716761
BrowserifyPower User HomeuiStartup32041991605693942224860
load14561000285952814222609
domContentLoaded14561000285952814212609
domInteractive11833793117115288
firstPaint------
backgroundConnect3262112243805751130
firstReactRender69372163171141
getState316801031253430893
initialActions2129323
loadScripts1325972268841013482511
setupStore11051038153108434
numNetworkReqs76491462273127
WebpackStandard HomeuiStartup16041301204717617161952
load13131087170012814001559
domContentLoaded13121087169912813981558
domInteractive68282343787132
firstPaint------
backgroundConnect55221763270126
firstReactRender29217883140
getState147125171326
initialActions105122
loadScripts12801071159811913701485
setupStore195194291575
numNetworkReqs1256517762
WebpackPower User HomeuiStartup32152189573182038824597
load16061144273645117552538
domContentLoaded16051144273645117552538
domInteractive114331008139103294
firstPaint------
backgroundConnect198271079242202923
firstReactRender68402874266119
getState336841618303581866
initialActions4157927
loadScripts15121110270037316052376
setupStore1008107417485459
numNetworkReqs78601452372129
📊 Page Load Benchmark Results

Current Commit: ba4bac1 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 992ms (±42ms) 🟢 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 686ms (±38ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 992ms 42ms 963ms 1.29s 1.02s 1.29s
domContentLoaded 686ms 38ms 662ms 949ms 706ms 949ms
firstPaint 76ms 10ms 64ms 160ms 84ms 160ms
firstContentfulPaint 76ms 10ms 64ms 160ms 84ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 993 Bytes (0.01%)
  • common: 20 Bytes (0%)


const batchTransactionValues =
currentConfirmation?.nestedTransactions?.map(
(trxn) => (trxn.value as Hex) ?? 0x0,
Copy link

Choose a reason for hiding this comment

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

Bug: Numeric literal used instead of hex string in fallback

The fallback value 0x0 is a numeric literal (the number zero) rather than the hex string '0x0'. When trxn.value is undefined, this will insert the number 0 into batchTransactionValues instead of a hex string. The sumHexes function expects string arguments with base 16, so passing a number could cause incorrect calculations or type errors depending on how the Numeric class handles the mismatch. The fallback should be quoted as '0x0'.

Fix in Cursor Fix in Web

@metamaskbot
Copy link
Collaborator

Builds ready [2c63ed4]
UI Startup Metrics (1244 ± 111 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12441058159511113251443
load104487913629911251233
domContentLoaded103787413449911161226
domInteractive2715119222187
firstPaint55283135641610251161
backgroundConnect21419525811219236
firstReactRender321984123762
getState3715138184362
initialActions104112
loadScripts8296631127968861006
setupStore1264751322
numNetworkReqs1157217561
BrowserifyPower User HomeuiStartup20051652262620921172392
load1020875166413010731292
domContentLoaded1008871165013010611282
domInteractive3017215252888
firstPaint53510016733959441213
backgroundConnect253198647100234540
firstReactRender5439215185872
getState19114872362200259
initialActions103112
loadScripts79967613531258461071
setupStore17105091639
numNetworkReqs80652362874151
WebpackStandard HomeuiStartup802683101973835962
load62855885468673780
domContentLoaded62455283168670776
domInteractive2615110222195
firstPaint21875799159198579
backgroundConnect1053361126
firstReactRender26198173035
getState251357103242
initialActions104111
loadScripts62155182266668774
setupStore1062631116
numNetworkReqs1156816560
WebpackPower User HomeuiStartup16561278230824618682143
load7075991206108727920
domContentLoaded6985911188108714908
domInteractive34191802830113
firstPaint330105921213620719
backgroundConnect102861618859562
firstReactRender624892106887
getState18814772861189261
initialActions103112
loadScripts6955891177106712906
setupStore171055101643
numNetworkReqs84642564273222
FirefoxBrowserifyStandard HomeuiStartup13981119182315814801746
load115296114959812031311
domContentLoaded115296114959812021311
domInteractive71322093687148
firstPaint------
backgroundConnect52232323650140
firstReactRender26195972737
getState187203291446
initialActions103122
loadScripts112194514439011681283
setupStore146128171234
numNetworkReqs1256716663
BrowserifyPower User HomeuiStartup31382041526590741824696
load14301029284049814662610
domContentLoaded14301029284049814662609
domInteractive11532763103111324
firstPaint------
backgroundConnect2483112283143531140
firstReactRender66382933766137
getState311891397276413955
initialActions3038628
loadScripts13241011258539813682355
setupStore14961060229113732
numNetworkReqs77531512372129
WebpackStandard HomeuiStartup14971291203112815721747
load1233107214389213061403
domContentLoaded1232107214389213011401
domInteractive60242233881139
firstPaint------
backgroundConnect49221753145115
firstReactRender27204053036
getState157165191451
initialActions103122
loadScripts1206105614038512701364
setupStore146101141342
numNetworkReqs1256516762
WebpackPower User HomeuiStartup32662212583393243034698
load16041120289653416532798
domContentLoaded16031119289653416522797
domInteractive125281222183102333
firstPaint------
backgroundConnect2402613093302161124
firstReactRender70392844268187
getState315811332284456855
initialActions207123
loadScripts14861104288043315222624
setupStore995107915293448
numNetworkReqs78561402373130
📊 Page Load Benchmark Results

Current Commit: 2c63ed4 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±46ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±68ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 91ms (±135ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 46ms 1.03s 1.43s 1.07s 1.43s
domContentLoaded 734ms 68ms 712ms 1.37s 756ms 1.37s
firstPaint 91ms 135ms 64ms 1.44s 88ms 1.44s
firstContentfulPaint 91ms 135ms 64ms 1.44s 88ms 1.44s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 993 Bytes (0.01%)
  • common: 20 Bytes (0%)

@vinistevam vinistevam added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
// - Gasless is NOT supported (user needs native currency for gas)
// - Gasless IS supported but gasFeeTokens is empty (no alternative tokens available)
const shouldCheckGaslessConditions =
isGaslessCheckComplete && (!isGaslessSupported || isGasFeeTokensEmpty);
Copy link

Choose a reason for hiding this comment

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

Bug: Alert suppressed when simulation disabled but gasless supported

When simulation is disabled and gasless IS supported, the insufficient balance alert will never show. The old code had canSkipSimulationChecks = ignoreGasFeeToken || !isSimulationEnabled which allowed the alert to show when simulation was disabled. The new shouldCheckGaslessConditions requires !isGaslessSupported || isGasFeeTokensEmpty, but when gasFeeTokens is undefined (never loaded because simulation is disabled), isGasFeeTokensEmpty is false (since undefined?.length === 0 evaluates to false). This means users with insufficient balance who have simulation disabled but gasless supported will never see the alert, even though they cannot actually use gas fee tokens.

Additional Locations (1)

Fix in Cursor Fix in Web

@metamaskbot
Copy link
Collaborator

Builds ready [244bac1]
UI Startup Metrics (1253 ± 95 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1253104115479513061445
load103386713338210681195
domContentLoaded102786413278210631187
domInteractive21154262137
firstPaint4457612103749711078
backgroundConnect21119426212216239
firstReactRender453289124970
getState321689143660
initialActions107112
loadScripts823665112178855985
setupStore1263251225
numNetworkReqs86317629
BrowserifyPower User HomeuiStartup18411476233614219202060
load1041887127410011251210
domContentLoaded103187812679911051201
domInteractive25166892549
firstPaint5299412034069981176
backgroundConnect266195604115235558
firstReactRender483810195070
getState17914431828193229
initialActions102012
loadScripts82367910401009061000
setupStore14103651429
numNetworkReqs68591931766106
WebpackStandard HomeuiStartup853729111367889985
load65958586964697797
domContentLoaded65358086364692789
domInteractive22154672240
firstPaint21190757145205632
backgroundConnect1153671229
firstReactRender59342173960148
getState251455103345
initialActions103112
loadScripts65057885964688786
setupStore1062441119
numNetworkReqs86316629
WebpackPower User HomeuiStartup14891191191816516171776
load7445961086102822914
domContentLoaded7375891080101814907
domInteractive2717236222649
firstPaint26594908183245726
backgroundConnect64662413541541
firstReactRender49407055061
getState19014133341205271
initialActions102111
loadScripts7345861074101811904
setupStore15766101336
numNetworkReqs66561071165101
FirefoxBrowserifyStandard HomeuiStartup13161116181314013871596
load1074948150110911231313
domContentLoaded1073948150010911221313
domInteractive5533136257598
firstPaint------
backgroundConnect4123136224497
firstReactRender38317874054
getState117126121020
initialActions103122
loadScripts1049930148110310941283
setupStore1167691123
numNetworkReqs86276725
BrowserifyPower User HomeuiStartup26911629409760931643470
load1720987252154221892394
domContentLoaded1719987252154221892394
domInteractive154321393296911045
firstPaint------
backgroundConnect1832312212372011024
firstReactRender5738106146099
getState1388033344163228
initialActions3043528
loadScripts1618970243751021072352
setupStore4253427435282
numNetworkReqs68481201567113
WebpackStandard HomeuiStartup15331341194312815941847
load1241110014697513141352
domContentLoaded1241110014697513131352
domInteractive57271623278129
firstPaint------
backgroundConnect44191582349102
firstReactRender41328484457
getState167220261453
initialActions103122
loadScripts1217108414447312861327
setupStore175180301246
numNetworkReqs86265824
WebpackPower User HomeuiStartup27691795392053531543554
load18571174259946422752495
domContentLoaded18561174259846522752495
domInteractive185331126305105995
firstPaint------
backgroundConnect11322962135135306
firstReactRender5941128156285
getState1307927551154240
initialActions3038427
loadScripts17971156249544822112419
setupStore5564679437321
numNetworkReqs70581291667117
📊 Page Load Benchmark Results

Current Commit: 244bac1 | Date: 12/9/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±39ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±61ms) 🟢 | historical mean value: 734ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±43ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 39ms 1.01s 1.33s 1.06s 1.33s
domContentLoaded 722ms 61ms 699ms 1.28s 742ms 1.28s
firstPaint 80ms 43ms 60ms 500ms 88ms 500ms
firstContentfulPaint 80ms 43ms 60ms 500ms 88ms 500ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 993 Bytes (0.01%)
  • common: 20 Bytes (0%)

@vinistevam vinistevam added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 3300cde Dec 9, 2025
333 of 335 checks passed
@vinistevam vinistevam deleted the vs/flickering-gas-station branch December 9, 2025 12:35
@metamaskbot metamaskbot added the release-13.14.0 Issue or pull request that will be included in release 13.14.0 label Dec 9, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR fixes a [issue raised by
cursor](#38306 (comment))
to 0x0 is a numeric literal (the number zero) rather than the hex string
'0x0'

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38649?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes: MetaMask/MetaMask-planning#6408

## **Manual testing steps**

1. Send flow with insufficient  balance
2. should display the insufficient alert 

## **Screenshots/Recordings**


[alert.webm](https://github.com/user-attachments/assets/5cf66e88-8256-4995-9b2d-4cb30f2f5198)


<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Standardizes zero-hex fallback via a shared `ZERO_HEX_FALLBACK` in
`useHasInsufficientBalance` for tx value, batch values, and balance
lookups.
> 
> - **Hooks**
>   - `ui/pages/confirmations/hooks/useHasInsufficientBalance.ts`:
>     - Introduces `ZERO_HEX_FALLBACK = '0x0'`.
> - Replaces inline zero-hex defaults with `ZERO_HEX_FALLBACK` for
`txParams.value`, nested transaction values, and balance fallback.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3d24dbb. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants