Skip to content

Conversation

@chaitanyapotti
Copy link
Member

@chaitanyapotti chaitanyapotti commented Nov 12, 2025

Description

Update error codes for shield rule engine

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Updated error codes for shield rule engine

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

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

Updates Transaction Shield alert mappings (including new E800–E803 and tweaks to E007/E402) and adds locale strings for high-risk transactions and token warning.

  • Shield Coverage Alerts:
    • Update getModalBodyStr mappings in ui/pages/confirmations/hooks/alerts/useShieldCoverageAlert.ts:
      • Add new codes E800E803 (high-risk swap receiver, token warning, invalid sentinel results) with corresponding messages.
      • Map E402 to shieldCoverageAlertMessageTxTypeNotSupported.
      • Change E007 to shieldCoverageAlertMessageUnknown.
  • Localization:
    • Add shieldCoverageAlertHighRiskTransaction and shieldCoverageAlertMessageTokenTrustSignalWarning to app/_locales/en/messages.json and app/_locales/en_GB/messages.json.

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

@chaitanyapotti chaitanyapotti requested a review from a team as a code owner November 12, 2025 14:20
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Nov 12, 2025
@metamaskbot metamaskbot added the team-web3auth Web3Auth team label Nov 12, 2025
@chaitanyapotti chaitanyapotti added area-shield team-web3auth Web3Auth team and removed team-web3auth Web3Auth team labels Nov 12, 2025
@chaitanyapotti chaitanyapotti changed the title Update error msgs feat: update error msgs Nov 12, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Nov 12, 2025

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (1 files, +67 -47)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📁 alerts/
            • 📄 useShieldCoverageAlert.ts +67 -47

🔐 @MetaMask/web3auth (1 files, +67 -47)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📁 alerts/
            • 📄 useShieldCoverageAlert.ts +67 -47

@metamaskbot
Copy link
Collaborator

Builds ready [49cd87b]
UI Startup Metrics (1203 ± 87 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1203105315798712571343
load104491513517811011191
domContentLoaded103690113367910961171
domInteractive221484161873
firstPaint65180134142610611170
backgroundConnect23221731013233245
firstReactRender26174252738
getState21864102746
initialActions001001
loadScripts812671110579872939
setupStore1052431217
numNetworkReqs1367619671
BrowserifyPower User HomeuiStartup16531469244627619552446
load1047906160322113121603
domContentLoaded1041898159722113061597
domInteractive37151073591107
firstPaint65117716023979271602
backgroundConnect23721927916250279
firstReactRender29234462944
getState17415620615188206
initialActions001011
loadScripts814675132421010771324
setupStore1373371333
numNetworkReqs1207525360169253
WebpackStandard HomeuiStartup8106931191988051054
load60355297688596860
domContentLoaded59654896085590846
domInteractive161161101345
firstPaint22856963228205849
backgroundConnect231266122549
firstReactRender28175883340
getState1163131215
initialActions001001
loadScripts59354795083588836
setupStore1153751222
numNetworkReqs1468120872
WebpackPower User HomeuiStartup1112892173029414351730
load662567910127803910
domContentLoaded646557869117782869
domInteractive35131524053152
firstPaint34073902261574902
backgroundConnect45101654351165
firstReactRender27253422734
getState1409616824155168
initialActions001011
loadScripts642555858113769858
setupStore1961443310144
numNetworkReqs1076822554163225
FirefoxBrowserifyStandard HomeuiStartup14831289201212315281744
load1257110615799313091442
domContentLoaded1256110615799313091442
domInteractive1103535663109275
firstPaint------
backgroundConnect46261512351107
firstReactRender26225362645
getState137191181118
initialActions001001
loadScripts1229109015528912721404
setupStore1276781229
numNetworkReqs1266115758
BrowserifyPower User HomeuiStartup21831764339951524063399
load13401130177820316241778
domContentLoaded13391129177820316231778
domInteractive20084577181439577
firstPaint------
backgroundConnect11629452118210452
firstReactRender452972115372
getState1409228046176280
initialActions001011
loadScripts12971111174220115741742
setupStore2451002641100
numNetworkReqs1377032489219324
WebpackStandard HomeuiStartup15761419220115715821958
load13471202187411713801615
domContentLoaded13471201187411713801614
domInteractive953340047104168
firstPaint------
backgroundConnect45191402250108
firstReactRender332480143278
getState1275791221
initialActions1042401
loadScripts13191183183710913461540
setupStore176206251169
numNetworkReqs1367017766
WebpackPower User HomeuiStartup20851788268929024132689
load14671246189218416271892
domContentLoaded14671246189218416261892
domInteractive14338463118250463
firstPaint------
backgroundConnect72362595474259
firstReactRender35294643746
getState1016915922108159
initialActions106216
loadScripts14371226183217915901832
setupStore2671864412186
numNetworkReqs1336425369203253
📊 Page Load Benchmark Results

Current Commit: 49cd87b | Date: 11/12/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±43ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±39ms) 🟢 | historical mean value: 728ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±11ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 43ms 1.02s 1.36s 1.10s 1.36s
domContentLoaded 741ms 39ms 706ms 1.02s 766ms 1.02s
firstPaint 80ms 11ms 64ms 180ms 88ms 180ms
firstContentfulPaint 80ms 11ms 64ms 180ms 88ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0%)
  • ui: 164 Bytes (0%)
  • common: 302 Bytes (0%)

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Nov 12, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [943bb72]
UI Startup Metrics (1190 ± 87 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1190103915278712341355
load103389513518010751180
domContentLoaded102889213417910721173
domInteractive2213104181870
firstPaint60777134941310391170
backgroundConnect2262102487230239
firstReactRender25184852640
getState21794122542
initialActions001001
loadScripts807677110078854953
setupStore1173641115
numNetworkReqs1367620671
BrowserifyPower User HomeuiStartup16641469252428018792524
load1059919164921612651649
domContentLoaded1050915164221412551642
domInteractive421513843102138
firstPaint80217313824039581382
backgroundConnect2382242548244254
firstReactRender29255572955
getState17416220414185204
initialActions002112
loadScripts820693139420810221394
setupStore1292741127
numNetworkReqs1197325272231252
WebpackStandard HomeuiStartup8286971233998251093
load614559101787604878
domContentLoaded60755497782599851
domInteractive171193141449
firstPaint210611018208201766
backgroundConnect241279142663
firstReactRender29176593450
getState1153031316
initialActions001001
loadScripts60455296680597841
setupStore1163041321
numNetworkReqs1367719871
WebpackPower User HomeuiStartup1067879176930611941769
load666579982138772982
domContentLoaded653568948128757948
domInteractive321398327698
firstPaint32361951315599951
backgroundConnect5792547177254
firstReactRender26242912729
getState1429916520157165
initialActions001001
loadScripts648566938125746938
setupStore1162661326
numNetworkReqs1036522352133223
FirefoxBrowserifyStandard HomeuiStartup14421283192413314701776
load1218110515779412491441
domContentLoaded1217110415769412491441
domInteractive1003432150106203
firstPaint------
backgroundConnect44241342250109
firstReactRender26215052740
getState1177071120
initialActions001001
loadScripts1192108415548812191401
setupStore146182191230
numNetworkReqs1267115860
BrowserifyPower User HomeuiStartup22601843363448326443634
load14951199215030417602150
domContentLoaded14951199214930417592149
domInteractive22580624209562624
firstPaint------
backgroundConnect1083233294188332
firstReactRender463195145095
getState1269718522133185
initialActions102112
loadScripts14451175202128717292021
setupStore4963277862327
numNetworkReqs1357222963198229
WebpackStandard HomeuiStartup15941384195313716311920
load13591174162310814061586
domContentLoaded13591174162310814051586
domInteractive95313754399163
firstPaint------
backgroundConnect46241202252104
firstReactRender342393143478
getState138180181125
initialActions001001
loadScripts13301158158110213791551
setupStore186186241365
numNetworkReqs1366717864
WebpackPower User HomeuiStartup22991902329644127923296
load15231299203721917712037
domContentLoaded15221298203621917712036
domInteractive16648549149326549
firstPaint------
backgroundConnect93312697696269
firstReactRender48331011554101
getState1298121039183210
initialActions102112
loadScripts14841280197820516871978
setupStore29889276289
numNetworkReqs13565329102250329
📊 Page Load Benchmark Results

Current Commit: 943bb72 | Date: 11/12/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: 714ms (±34ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 37ms 1.01s 1.30s 1.05s 1.30s
domContentLoaded 714ms 34ms 698ms 971ms 735ms 971ms
firstPaint 75ms 12ms 56ms 176ms 84ms 176ms
firstContentfulPaint 75ms 12ms 56ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 164 Bytes (0%)
  • common: 312 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [4ebd6bf]
UI Startup Metrics (1238 ± 101 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12381075157710112971418
load106893313739211311229
domContentLoaded106292813609011231223
domInteractive2315121171867
firstPaint57879124542410501190
backgroundConnect23321929610236247
firstReactRender28195383147
getState23966102841
initialActions003001
loadScripts835710111990895994
setupStore1163841119
numNetworkReqs1367219669
BrowserifyPower User HomeuiStartup16441453241127419412411
load1034893158621012931586
domContentLoaded1027886157220812861572
domInteractive38161173686117
firstPaint62017715844389321584
backgroundConnect23522127014247270
firstReactRender28253632736
getState17215721316188213
initialActions001011
loadScripts801669131619910501316
setupStore1292651226
numNetworkReqs1207325275246252
WebpackStandard HomeuiStartup8377031194968441074
load61956098086616848
domContentLoaded61255495981605831
domInteractive171276121450
firstPaint22459961221205814
backgroundConnect251189153064
firstReactRender301870103553
getState1163341318
initialActions001001
loadScripts60955294879603821
setupStore1262941318
numNetworkReqs1367419870
WebpackPower User HomeuiStartup1017862148322312301483
load66257010201407151020
domContentLoaded645554986133676986
domInteractive33131123569112
firstPaint3717010253155991025
backgroundConnect41102205050220
firstReactRender26243022730
getState1429418225158182
initialActions001011
loadScripts641552976129666976
setupStore96306930
numNetworkReqs1066921044163210
FirefoxBrowserifyStandard HomeuiStartup14091271179611914191693
load1194109115078512041389
domContentLoaded1194109115068412031389
domInteractive963526836103170
firstPaint------
backgroundConnect4225185254586
firstReactRender25204452639
getState137185191121
initialActions002111
loadScripts1170107114787811781345
setupStore1374881332
numNetworkReqs1367920774
BrowserifyPower User HomeuiStartup21261744354348723633543
load13431108174720316231747
domContentLoaded13431108174620316231746
domInteractive19383527166377527
firstPaint------
backgroundConnect13024709162192709
firstReactRender41305264352
getState1348927746166277
initialActions30338133
loadScripts12931090168020415691680
setupStore4363007238300
numNetworkReqs1377232788216327
WebpackStandard HomeuiStartup16021378209714616201963
load13561192174310413931583
domContentLoaded13561191174310413931583
domInteractive913238141101148
firstPaint------
backgroundConnect46201332251106
firstReactRender342483113776
getState1275281226
initialActions001001
loadScripts1328117416579713631556
setupStore15785141350
numNetworkReqs1366717765
WebpackPower User HomeuiStartup22341875298331725262983
load15141274179416516951794
domContentLoaded15141274179316516941793
domInteractive16256444124294444
firstPaint------
backgroundConnect913327670127276
firstReactRender432998164798
getState1118116122125161
initialActions101011
loadScripts14841255176616316651766
setupStore34796296296
numNetworkReqs1336427474205274
📊 Page Load Benchmark Results

Current Commit: 4ebd6bf | Date: 11/12/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 718ms (±34ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.30s 1.06s 1.30s
domContentLoaded 718ms 34ms 698ms 967ms 741ms 967ms
firstPaint 75ms 12ms 60ms 184ms 84ms 184ms
firstContentfulPaint 75ms 12ms 60ms 184ms 84ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 164 Bytes (0%)
  • common: 312 Bytes (0%)

@chaitanyapotti chaitanyapotti requested a review from a team as a code owner November 12, 2025 21:49
@metamaskbot
Copy link
Collaborator

Builds ready [6736940]
UI Startup Metrics (1246 ± 86 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1246111115178612991431
load107093612527611161220
domContentLoaded106392612437711111214
domInteractive231591182078
firstPaint64178127442310671177
backgroundConnect23622034615238255
firstReactRender28187793044
getState22868102638
initialActions001001
loadScripts834694101976883978
setupStore1279891221
numNetworkReqs1367619672
BrowserifyPower User HomeuiStartup16971517233022419112330
load1077912164520313081645
domContentLoaded1070906163920313021639
domInteractive421611841107118
firstPaint55817316534619641653
backgroundConnect2402322586244258
firstReactRender28263532935
getState18816522817199228
initialActions001011
loadScripts837677138719810651387
setupStore19962152762
numNetworkReqs1177125265168252
WebpackStandard HomeuiStartup8437151162998401118
load62057097986609878
domContentLoaded61255695282602862
domInteractive171260111448
firstPaint20762982200192703
backgroundConnect271292162966
firstReactRender30187793538
getState1263141418
initialActions001001
loadScripts60955494180600851
setupStore1263751419
numNetworkReqs1367419872
WebpackPower User HomeuiStartup1058860182131214291821
load66856810191608651019
domContentLoaded646558930138844930
domInteractive291382276182
firstPaint37378933330847933
backgroundConnect61162727180272
firstReactRender26233942639
getState1429917120152171
initialActions001011
loadScripts641556919134833919
setupStore96234923
numNetworkReqs1066921648168216
FirefoxBrowserifyStandard HomeuiStartup14811287191912015421756
load1251111114808813071439
domContentLoaded1251111014798813061439
domInteractive1093434553116224
firstPaint------
backgroundConnect47272632950101
firstReactRender27225972744
getState137200201122
initialActions001001
loadScripts1223109314538312831391
setupStore13590121134
numNetworkReqs1267116759
BrowserifyPower User HomeuiStartup22311827291036426822910
load14141191189825516721898
domContentLoaded14141191189825516711898
domInteractive22181613177409613
firstPaint------
backgroundConnect12137380107180380
firstReactRender473596145096
getState14410329246169292
initialActions106216
loadScripts13711170185123116431851
setupStore3661133062113
numNetworkReqs1427221758203217
WebpackStandard HomeuiStartup16381429210414416791972
load13921216173811814281649
domContentLoaded13921215173811814281649
domInteractive1033539453103208
firstPaint------
backgroundConnect49281322455113
firstReactRender342483133378
getState1275381321
initialActions001001
loadScripts13621193165410914061593
setupStore15794141243
numNetworkReqs1366917865
WebpackPower User HomeuiStartup23761958318541027823185
load15701362217022317002170
domContentLoaded15691361217022317002170
domInteractive17039448143324448
firstPaint------
backgroundConnect1054928471126284
firstReactRender48361071649107
getState1138217822121178
initialActions001011
loadScripts15291327207721116562077
setupStore3161183245118
numNetworkReqs1336731379224313
📊 Page Load Benchmark Results

Current Commit: 6736940 | Date: 11/12/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±86ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±108ms) 🟢 | historical mean value: 727ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±86ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 86ms 1.02s 1.79s 1.08s 1.79s
domContentLoaded 741ms 108ms 706ms 1.73s 753ms 1.73s
firstPaint 86ms 86ms 64ms 944ms 88ms 944ms
firstContentfulPaint 86ms 86ms 64ms 944ms 88ms 944ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 164 Bytes (0%)
  • common: 312 Bytes (0%)

@chaitanyapotti chaitanyapotti added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit c9600a5 Nov 12, 2025
174 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/shield-error-codes branch November 12, 2025 22:52
@github-project-automation github-project-automation bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Nov 12, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2025
@metamaskbot metamaskbot added the release-13.10.0 Issue or pull request that will be included in release 13.10.0 label Nov 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-shield release-13.10.0 Issue or pull request that will be included in release 13.10.0 size-M team-web3auth Web3Auth team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants