Skip to content

refactor: convert shared/lib/object.utils to TypeScript#41329

Merged
DDDDDanica merged 10 commits into
mainfrom
copilot/convert-object-utils-to-typescript
Apr 2, 2026
Merged

refactor: convert shared/lib/object.utils to TypeScript#41329
DDDDDanica merged 10 commits into
mainfrom
copilot/convert-object-utils-to-typescript

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

[skip-e2e]
Converts shared/lib/object.utils.js to TypeScript as part of the ongoing TS migration effort. Removes the file from development/ts-migration-dashboard/files-to-convert.json.

Changes

  • shared/lib/object.utils.ts — Replaces the .js file with proper TypeScript types:
    • AllProperties declared as unique symbol
    • ObjectMask intersection type combining a string index signature with an optional AllProperties symbol key
    • maskObject typed as (object: unknown, mask: ObjectMask) => Record<string, unknown> | string | null
    • Removed JSDoc {type} annotations in favour of TypeScript-native types; fixed a pre-existing backtick inconsistency in the JSDoc
  • development/ts-migration-dashboard/files-to-convert.json — Removed "shared/lib/object.utils.js" entry

The existing .test.ts file required no changes; its imports resolve to the new .ts file automatically.

export const AllProperties: unique symbol = Symbol('*');

type MaskValue = boolean | ObjectMask;

type ObjectMask = {
  [key: string]: MaskValue;
} & {
  [AllProperties]?: MaskValue;
};

export function maskObject(
  object: unknown,
  mask: ObjectMask,
): Record<string, unknown> | string | null { ... }

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.


Note

Medium Risk
Updates maskObject mask semantics (treating array-valued mask entries like false) and refactors Sentry state mask typing, which can change what state is captured/sanitized in Sentry payloads. While mostly a TS-typing refactor, it touches error-report context generation and required snapshot updates.

Overview
Converts shared/lib/object.utils to TypeScript by introducing a typed ObjectMask (with AllProperties as a unique symbol) and adding explicit typings/return types for maskObject.

Adjusts masking behavior so array-valued mask entries (e.g. [] used in Sentry state masks) are treated like exclusions and replaced with typeof/null values, and improves error reporting for unsupported mask entries.

Updates Sentry state mask definitions in app/scripts/constants/sentry-state.ts to use the shared ObjectMask types (and clarifies intent via new docblock), removes the TS-migration dashboard entry for the old JS file, and refreshes metrics e2e snapshots/import ordering to match the new masking output.

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

Copilot AI changed the title [WIP] Convert shared/lib/object.utils.js to TypeScript chore: convert shared/lib/object.utils to TypeScript Mar 27, 2026
Copilot AI requested a review from DDDDDanica March 27, 2026 21:22
@DDDDDanica DDDDDanica removed the skip-e2e Skip E2E test jobs label Mar 27, 2026
@DDDDDanica DDDDDanica changed the title chore: convert shared/lib/object.utils to TypeScript refactor: convert shared/lib/object.utils to TypeScript Mar 27, 2026
@DDDDDanica DDDDDanica added the team-extension-platform Extension Platform team label Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
Builds ready [83ee7e8]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account797308134442211241344
total797308134442211241344
Confirm Txconfirm_tx6054603060852060546085
total6054603060852060546085
Bridge User Actionsbridge_load_page2852802894287289
bridge_load_asset_picker26819833853322338
bridge_search_token81576191360857913
total13621241152411514751524
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14501202180711015031634
load1196988147710012531378
domContentLoaded118798114719912471368
domInteractive271659103047
firstPaint241721448244248311
backgroundConnect2071902369212224
firstReactRender20124362231
initialActions106114
loadScripts99579612829710461191
setupStore1363561723
numNetworkReqs35315963746
Chrome Browserify Startup Power User HomeuiStartup55001971161932888602513159
load13791155307820514231557
domContentLoaded13541143304919613921524
domInteractive4023280284570
firstPaint3021081588280319388
backgroundConnect244329312706264832219476
firstReactRender28196663137
initialActions106124
loadScripts1135945282619211681309
setupStore19755102239
numNetworkReqs2339735664277335
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2222212220222222
srpButtonToSrpForm99951043100104
confirmSrpToPwForm24212722527
pwFormToMetricsScreen16151711717
metricsToWalletReadyScreen17161701717
doneButtonToHomeScreen55453857413556574
openAccountMenuToAccountListLoaded2991290231139831103113
total385138443866838493866
Onboarding New WalletcreateWalletToSocialScreen2212182263223226
srpButtonToPwForm1101071143112114
createPwToRecoveryScreen999099
skipBackupToMetricsScreen43414414444
agreeButtonToOnboardingSuccess17151811718
doneButtonToAssetList50748653521535535
total92779810941009741094
Asset DetailsassetClickToPriceChart70647457474
total70647457474
Solana Asset DetailsassetClickToPriceChart68588397383
total68588397383
Import Srp HomeloginToHomeScreen2062201421304220542130
openAccountMenuAfterLogin53456475464
homeAfterImportWithNewWallet17292813257121524453257
total391623465729132645445729
Send TransactionsopenSendPageFromHome35333613636
selectTokenToSendFormLoaded29283012930
reviewTransactionToConfirmationPage1166876137417212851374
total1230951143516713501435
SwapopenSwapPageFromHome1201101297124129
fetchAndDisplaySwapQuotes269626882707827052707
total2816279928321128202832
🌐 Dapp Page Load Benchmarks

Current Commit: 83ee7e8 | Date: 3/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 725ms (±37ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±10ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1.01s 1.34s 1.07s 1.34s
domContentLoaded 725ms 37ms 704ms 1.02s 750ms 1.02s
firstPaint 85ms 10ms 68ms 168ms 96ms 168ms
firstContentfulPaint 85ms 10ms 68ms 168ms 96ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 24 Bytes (0%)

@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
Builds ready [6ccd2da]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account787280123341011521233
total787280123341011521233
Confirm Txconfirm_tx606660526078960686078
total606660526078960686078
Bridge User Actionsbridge_load_page29321040566320405
bridge_load_asset_picker23313433278298332
bridge_search_token84376391455862914
total13571222151410513701514
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1451124016929715031634
load119399214369012471363
domContentLoaded118598614189012401358
domInteractive281769103145
firstPaint236781255217253324
backgroundConnect21018626412213238
firstReactRender20143752333
initialActions105113
loadScripts99181012268710391154
setupStore1272751521
numNetworkReqs34316063646
Chrome Browserify Startup Power User HomeuiStartup49281966157502974551512654
load13391152341224013731514
domContentLoaded13151142335223013441486
domInteractive3721139213783
firstPaint266981770231300359
backgroundConnect172327610043224720297875
firstReactRender27176672941
initialActions107123
loadScripts1104955312022611301278
setupStore1676681730
numNetworkReqs1665433455187278
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202182242221224
srpButtonToSrpForm1051031082105108
confirmSrpToPwForm22222202222
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16161701617
doneButtonToHomeScreen52951454611531546
openAccountMenuToAccountListLoaded290928992917829162917
total3833379838813238433881
Onboarding New WalletcreateWalletToSocialScreen2192172211220221
srpButtonToPwForm1091081101109110
createPwToRecoveryScreen888088
skipBackupToMetricsScreen37373703737
agreeButtonToOnboardingSuccess16151711717
doneButtonToAssetList50647455429516554
total87986189615890896
Asset DetailsassetClickToPriceChart76728038080
total76728038080
Solana Asset DetailsassetClickToPriceChart60546856268
total60546856268
Import Srp HomeloginToHomeScreen2076200121235121212123
openAccountMenuAfterLogin593975147575
homeAfterImportWithNewWallet16673512568101724982568
total38502525464494145984644
Send TransactionsopenSendPageFromHome35234594245
selectTokenToSendFormLoaded33283843738
reviewTransactionToConfirmationPage1220990141117213881411
total12891064147216614611472
SwapopenSwapPageFromHome1171131224122122
fetchAndDisplaySwapQuotes269426882699426962699
total2814279228371728212837
🌐 Dapp Page Load Benchmarks

Current Commit: 6ccd2da | Date: 3/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±37ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±36ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±9ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 37ms 1.00s 1.31s 1.06s 1.31s
domContentLoaded 724ms 36ms 698ms 996ms 745ms 996ms
firstPaint 85ms 9ms 72ms 156ms 96ms 156ms
firstContentfulPaint 85ms 9ms 72ms 156ms 96ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 32 Bytes (0%)

@metamaskbotv2

metamaskbotv2 Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0205fa1]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account749334116233111171162
total749334116233111171162
Confirm Txconfirm_tx6058602760842660826084
total6058602760842660826084
Bridge User Actionsbridge_load_page2622472719268271
bridge_load_asset_picker26922230233300302
bridge_search_token1015747148629912521486
total15341174203933518132039
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Startup Standard HomeuiStartup1515133317789215611687
load1236104214979312851412
domContentLoaded1228103414869212791401
domInteractive271672102751
firstPaint196771498181251286
backgroundConnect21119126012218230
firstReactRender21144352230
initialActions207125
loadScripts103384512919110811205
setupStore1463251822
numNetworkReqs35315973851
Startup Power User HomeuiStartup4123209614220223451478487
load13811158371325814091609
domContentLoaded13611154369525313951524
domInteractive4018300324365
firstPaint247901510157307368
backgroundConnect135528710788178921064886
firstReactRender2818260252843
initialActions108113
loadScripts1142963337524111661286
setupStore1766191934
numNetworkReqs26610147778313389
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2182182190218219
srpButtonToSrpForm94939409494
confirmSrpToPwForm23222302323
pwFormToMetricsScreen15151601516
metricsToWalletReadyScreen17161811718
doneButtonToHomeScreen106699111656511171165
openAccountMenuToAccountListLoaded26652496292015627092920
total4045399441094240504109
Onboarding New WalletcreateWalletToSocialScreen2192182201220220
srpButtonToPwForm1081051123110112
createPwToRecoveryScreen889099
skipBackupToMetricsScreen42394734447
agreeButtonToOnboardingSuccess16161601616
doneButtonToAssetList1200995137814813631378
total15981391177014617551770
Asset DetailsassetClickToPriceChart815998159898
total815998159898
Solana Asset DetailsassetClickToPriceChart59546136161
total59546136161
Import Srp HomeloginToHomeScreen2196214922684622042268
openAccountMenuAfterLogin53485845758
homeAfterImportWithNewWallet90888955932515091119325
total1129411162114261251141111426
Send TransactionsopenSendPageFromHome27252912929
selectTokenToSendFormLoaded22202522325
reviewTransactionToConfirmationPage87984990526904905
total92388195230952952
SwapopenSwapPageFromHome74667867878
fetchAndDisplaySwapQuotes2709269027301527252730
total2783276628091727962809
🌐 Dapp Page Load Benchmarks

Current Commit: 0205fa1 | Date: 3/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±141ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 718ms (±151ms) 🟢 | historical mean value: 725ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 106ms (±218ms) 🟢 | historical mean value: 85ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 141ms 1.01s 2.41s 1.09s 2.41s
domContentLoaded 718ms 151ms 687ms 2.20s 761ms 2.20s
firstPaint 106ms 218ms 72ms 2.27s 92ms 2.27s
firstContentfulPaint 106ms 218ms 72ms 2.27s 92ms 2.27s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 91 Bytes (0%)

@metamaskbotv2

metamaskbotv2 Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
Builds ready [8ee4ef6]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account1084916142419711901424
total1084916142419711901424
Confirm Txconfirm_tx6046601960923060746092
total6046601960923060746092
Bridge User Actionsbridge_load_page27324529720285297
bridge_load_asset_picker22214329454233294
bridge_search_token84074396583901965
total14101227174819414921748
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Startup Standard HomeuiStartup1533131817979515871730
load1255105815338913041421
domContentLoaded1248105115198812971405
domInteractive2817121162851
firstPaint201791198163255317
backgroundConnect22019826011225235
firstReactRender22145872434
initialActions107125
loadScripts104385213078810901206
setupStore1476071525
numNetworkReqs36316473948
Startup Power User HomeuiStartup3632186811818170448415856
load13001123202511813531455
domContentLoaded12721108197011013161421
domInteractive4121309364075
firstPaint265931988234310371
backgroundConnect1021265876013986843404
firstReactRender24155472543
initialActions105113
loadScripts1069901167410111081218
setupStore1565081734
numNetworkReqs2079833753236313
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2172162181217218
srpButtonToSrpForm97901035103103
confirmSrpToPwForm22212312223
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151611616
doneButtonToHomeScreen1083101911555211081155
openAccountMenuToAccountListLoaded248624812489324892489
total40623908428913741414289
Onboarding New WalletcreateWalletToSocialScreen2212192211221221
srpButtonToPwForm1171121203119120
createPwToRecoveryScreen999099
skipBackupToMetricsScreen43414414444
agreeButtonToOnboardingSuccess17161701717
doneButtonToAssetList11811017142414712571424
total15901424183515116791835
Asset DetailsassetClickToPriceChart866810314101103
total866810314101103
Solana Asset DetailsassetClickToPriceChart67547797377
total67547797377
Import Srp HomeloginToHomeScreen2048203020651320522065
openAccountMenuAfterLogin44315784857
homeAfterImportWithNewWallet8781870688746187888874
total108721077710968681088010968
Send TransactionsopenSendPageFromHome25143373033
selectTokenToSendFormLoaded22222302323
reviewTransactionToConfirmationPage86684890723878907
total9068959147909914
SwapopenSwapPageFromHome582976187276
fetchAndDisplaySwapQuotes269426892699426982699
total2751271827732127672773
🌐 Dapp Page Load Benchmarks

Current Commit: 8ee4ef6 | Date: 3/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±41ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±39ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±10ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 41ms 1.01s 1.35s 1.06s 1.35s
domContentLoaded 732ms 39ms 706ms 1.03s 759ms 1.03s
firstPaint 85ms 10ms 64ms 164ms 96ms 164ms
firstContentfulPaint 85ms 10ms 64ms 164ms 96ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 91 Bytes (0%)

@sonarqubecloud

Copy link
Copy Markdown

@metamaskbotv2

metamaskbotv2 Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0ab2e99]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account80230412383489891238
total80230412383489891238
Confirm Txconfirm_tx6066604260841560796084
total6066604260841560796084
Bridge User Actionsbridge_load_page28024232327293323
bridge_load_asset_picker27417141786317417
bridge_search_token930757105713010251057
total14841223171518416091715
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Startup Standard HomeuiStartup1512133518428415511638
load1242107614327612831380
domContentLoaded1232107114227412661371
domInteractive2717103112745
firstPaint1727633274245283
backgroundConnect21719437521222236
firstReactRender22127282337
initialActions107124
loadScripts103286912167310671176
setupStore1473761621
numNetworkReqs36316373848
Startup Power User HomeuiStartup4061212216032206752746277
load13271147324822913551566
domContentLoaded13061138322722413331553
domInteractive3820131204082
firstPaint250891642191297342
backgroundConnect135828612533168721843470
firstReactRender25174872837
initialActions1010113
loadScripts1096931299721811051300
setupStore1764992136
numNetworkReqs1695331952193255
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182222221222
srpButtonToSrpForm95949509595
confirmSrpToPwForm22222302223
pwFormToMetricsScreen15151601516
metricsToWalletReadyScreen16161601616
doneButtonToHomeScreen1089103011343911201134
openAccountMenuToAccountListLoaded249324842503724952503
total3964393139882139783988
Onboarding New WalletcreateWalletToSocialScreen2212172264225226
srpButtonToPwForm1071041092108109
createPwToRecoveryScreen888088
skipBackupToMetricsScreen38374013940
agreeButtonToOnboardingSuccess16151711617
doneButtonToAssetList1091102611364711361136
total1486141515245015241524
Asset DetailsassetClickToPriceChart1226220052160200
total1226220052160200
Solana Asset DetailsassetClickToPriceChart65567777177
total65567777177
Import Srp HomeloginToHomeScreen2120206321743921252174
openAccountMenuAfterLogin49465225252
homeAfterImportWithNewWallet88888599908817989489088
total1105610762113141981112011314
Send TransactionsopenSendPageFromHome26213242932
selectTokenToSendFormLoaded25222822628
reviewTransactionToConfirmationPage88185194143941941
total88976799080900990
SwapopenSwapPageFromHome76698068080
fetchAndDisplaySwapQuotes2696268327081027062708
total2770272728143027862814
🌐 Dapp Page Load Benchmarks

Current Commit: 0ab2e99 | Date: 3/30/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±45ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 719ms (±40ms) 🟢 | historical mean value: 722ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±11ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 45ms 1.00s 1.34s 1.07s 1.34s
domContentLoaded 719ms 40ms 697ms 1.02s 750ms 1.02s
firstPaint 83ms 11ms 68ms 176ms 92ms 176ms
firstContentfulPaint 83ms 11ms 68ms 176ms 92ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 95 Bytes (0%)

@DDDDDanica DDDDDanica marked this pull request as ready for review March 30, 2026 17:39
@DDDDDanica DDDDDanica enabled auto-merge March 30, 2026 18:04

@gauthierpetetin gauthierpetetin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I added non-blocking comments, but looks good to me.

* exclude it. A sub-mask implies the property should be further masked
* according to that sub-mask. The "AllProperties" symbol is used for objects
* with dynamic keys, and applies a rule (either `true`, `false`, or a
* sub-mask`) to every property in that object.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: extra ` to remove

@DDDDDanica DDDDDanica Apr 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gonna address in another PR cfe6989

state[key] = obj[key];
} else if (Array.isArray(maskKey)) {
// Array masks (e.g. empty `[]` in Sentry state) — surface typeof only, like `false`.
state[key] = obj[key] === null ? null : typeof obj[key];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we've changed the behavior of maskObject function here, maybe we we can reflect it in unit tests?

@DDDDDanica DDDDDanica Apr 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gonna address in another PR cfe6989

@DDDDDanica DDDDDanica added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 2, 2026
@DDDDDanica DDDDDanica added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 2, 2026
@DDDDDanica DDDDDanica added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit e4d0c5f Apr 2, 2026
396 of 398 checks passed
@DDDDDanica DDDDDanica deleted the copilot/convert-object-utils-to-typescript branch April 2, 2026 13:47
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
@metamaskbot metamaskbot added the release-13.26.0 Issue or pull request that will be included in release 13.26.0 label Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants