metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

Fix swap approval translation

Open cursor[bot] opened this issue 1 month ago • 3 comments

Add fallback for swapApproval token symbol to prevent i18n substitution errors when the symbol is missing.

The i18n system throws an error if a substitution value is null or undefined. Previously, if both bridgeTokenDisplayData.sourceTokenSymbol and primaryTransaction.sourceTokenSymbol were missing for a swapApproval transaction, the t() function would receive an undefined value, leading to the "Insufficient number of substitutions" error. This change ensures a generic "Token" label is used as a fallback in such cases.


Open in Cursor Open in Web

cursor[bot] avatar Dec 10 '25 16:12 cursor[bot]

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch. Learn more about Cursor Agents

cursor[bot] avatar Dec 10 '25 16:12 cursor[bot]

CLA Signature Action:

Thank you for your submission, we really appreciate it. We ask that you read and sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:

I have read the CLA Document and I hereby sign the CLA

By commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to this repository.

0 out of 1 committers have signed the CLA. :x: @cursoragent

github-actions[bot] avatar Dec 10 '25 16:12 github-actions[bot]

Builds ready [acd22c4]
UI Startup Metrics (1297 ± 120 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12971036157412013731514
load105685612979511101236
domContentLoaded104984912829410981220
domInteractive261596182277
firstPaint52183123241210181176
backgroundConnect22119628416228258
firstReactRender433191124574
getState3518118183867
initialActions107111
loadScripts836654105588888981
setupStore1162841120
numNetworkReqs1368119668
BrowserifyPower User HomeuiStartup19121553262819919952278
load1067905157512411231300
domContentLoaded1056896156112311111286
domInteractive32181472728113
firstPaint65796157343610651304
backgroundConnect24220563274233481
firstReactRender49398175162
getState20314673196205279
initialActions102112
loadScripts84169313041208971075
setupStore17104081635
numNetworkReqs71582272368121
WebpackStandard HomeuiStartup821684107178855963
load66557486074713810
domContentLoaded65956985574708805
domInteractive2716113212289
firstPaint25398836178223693
backgroundConnect1154251117
firstReactRender54332063656142
getState271457103451
initialActions104112
loadScripts65656784673705802
setupStore1164151421
numNetworkReqs1468320672
WebpackPower User HomeuiStartup14321106228222616321814
load7265971063109836929
domContentLoaded7195901056109823924
domInteractive32161572927109
firstPaint29489897218299846
backgroundConnect90864416591596
firstReactRender49417955258
getState17814125828189246
initialActions103111
loadScripts7165881047108821916
setupStore1373961332
numNetworkReqs72572372767142
FirefoxBrowserifyStandard HomeuiStartup13061080248524513541848
load1070899219219811051310
domContentLoaded1069898219219811051310
domInteractive8031117215584147
firstPaint------
backgroundConnect46202903951108
firstReactRender37306983857
getState1177091124
initialActions102012
loadScripts1044883212719110801249
setupStore156241261040
numNetworkReqs1568121975
BrowserifyPower User HomeuiStartup27211807430152830913457
load1639988259750321102440
domContentLoaded1639988259750321102440
domInteractive13132100120398910
firstPaint------
backgroundConnect210271095230237951
firstReactRender6037113136484
getState1384634153161246
initialActions3156726
loadScripts1539973247946119752272
setupStore744109020054263
numNetworkReqs75531442371133
WebpackStandard HomeuiStartup15801317278421616912017
load13161123244816813721536
domContentLoaded13161123244816813721536
domInteractive71271613286132
firstPaint------
backgroundConnect63202874783153
firstReactRender42329894557
getState197172281359
initialActions103012
loadScripts12801092242616013371497
setupStore166190241352
numNetworkReqs1568120873
WebpackPower User HomeuiStartup28541806463957532263649
load19231155269351123732625
domContentLoaded19221155269351123732624
domInteractive182301033296127961
firstPaint------
backgroundConnect199212428308219972
firstReactRender6039126136480
getState1417837451168236
initialActions3142637
loadScripts18331137266947822602535
setupStore5254808059264
numNetworkReqs71451272368120
📊 Page Load Benchmark Results

Current Commit: acd22c4 | Date: 12/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±50ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±45ms) 🟢 | historical mean value: 720ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±18ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 50ms 1.01s 1.44s 1.08s 1.44s
domContentLoaded 731ms 45ms 702ms 1.08s 759ms 1.08s
firstPaint 79ms 18ms 60ms 244ms 88ms 244ms
firstContentfulPaint 79ms 18ms 60ms 244ms 88ms 244ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 1.16 KiB (0.01%)
  • common: 20 Bytes (0%)

metamaskbot avatar Dec 10 '25 16:12 metamaskbot