Skip to content

Conversation

@lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Nov 6, 2025

Description

This PR integrates @metamask/claims-controller into extension and added SIWE signature generation for the claim.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Added @metamask/claims-controller for shield claims
CHANGELOG entry: Added Claim Signature Generation.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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 metamaskbot added the team-web3auth Web3Auth team label Nov 6, 2025
@github-actions github-actions bot added the size-L label Nov 6, 2025
@lwin-kyaw
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

metamaskbot commented Nov 6, 2025

✨ Files requiring CODEOWNER review ✨

🧩 @MetaMask/extension-devs (5 files, +35 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +7 -0
      • 📁 experimental/
        • 📄 policy.json +7 -0
      • 📁 flask/
        • 📄 policy.json +7 -0
      • 📁 main/
        • 📄 policy.json +7 -0
    • 📁 webpack/
      • 📄 policy.json +7 -0

📜 @MetaMask/policy-reviewers (5 files, +35 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +7 -0
      • 📁 experimental/
        • 📄 policy.json +7 -0
      • 📁 flask/
        • 📄 policy.json +7 -0
      • 📁 main/
        • 📄 policy.json +7 -0
    • 📁 webpack/
      • 📄 policy.json +7 -0

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.


🔗 @MetaMask/supply-chain (5 files, +35 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +7 -0
      • 📁 experimental/
        • 📄 policy.json +7 -0
      • 📁 flask/
        • 📄 policy.json +7 -0
      • 📁 main/
        • 📄 policy.json +7 -0
    • 📁 webpack/
      • 📄 policy.json +7 -0

@metamaskbot
Copy link
Collaborator

Builds ready [e9c3d5d]
UI Startup Metrics (1223 ± 92 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1223107814749212781412
load105291012458311131215
domContentLoaded104690412368311071209
domInteractive211471122058
firstPaint631121126441110441160
backgroundConnect23121628110235248
firstReactRender28195373145
getState23776122849
initialActions002001
loadScripts822666101883882984
setupStore1152331218
numNetworkReqs1367519672
BrowserifyPower User HomeuiStartup20001749276632923672766
load1051918163920512791639
domContentLoaded1041910162320312681623
domInteractive33161333055133
firstPaint72917816294459761629
backgroundConnect24321830822255308
firstReactRender27243422834
getState1681591888169188
initialActions101111
loadScripts810685132418610231324
setupStore1392851128
numNetworkReqs1197125174243251
WebpackStandard HomeuiStartup762652114575771934
load54550691265538705
domContentLoaded53849989462532691
domInteractive161159101437
firstPaint22153899195199635
backgroundConnect251284132652
firstReactRender2916236223235
getState1043041215
initialActions001001
loadScripts53549688661530684
setupStore1152951226
numNetworkReqs1467920872
WebpackPower User HomeuiStartup1209968168916012381689
load62454586497640864
domContentLoaded61153583691629836
domInteractive221251143351
firstPaint30180753211559753
backgroundConnect46111955149195
firstReactRender25222922829
getState1385117831155178
initialActions001011
loadScripts60753382688627826
setupStore1353392433
numNetworkReqs1056923049165230
FirefoxBrowserifyStandard HomeuiStartup15011305197413815601802
load1267113015799713271443
domContentLoaded1266112915799713261442
domInteractive1173430550125239
firstPaint------
backgroundConnect4625128205290
firstReactRender27227172744
getState849311716
initialActions002001
loadScripts1238111114719013041400
setupStore1354061532
numNetworkReqs1266315759
BrowserifyPower User HomeuiStartup25072177322027927813220
load13851172177619516121776
domContentLoaded13851171177619516121776
domInteractive20485486151438486
firstPaint------
backgroundConnect12033408107191408
firstReactRender41305784757
getState1367522138168221
initialActions105115
loadScripts13521151173518615791735
setupStore3371864245186
numNetworkReqs1326831172196311
WebpackStandard HomeuiStartup15991396205614816481963
load13681190166610714481594
domContentLoaded13671189166610714481593
domInteractive1053136146118186
firstPaint------
backgroundConnect50242183251116
firstReactRender29237282941
getState74707717
initialActions001001
loadScripts1337117115839814131533
setupStore167133191351
numNetworkReqs1366918766
WebpackPower User HomeuiStartup25422217304727027453047
load15301216193721417331937
domContentLoaded15291216193621317331936
domInteractive16041489137265489
firstPaint------
backgroundConnect1053133090174330
firstReactRender403159105059
getState1448923443195234
initialActions102112
loadScripts14891198179619116911796
setupStore291182244182
numNetworkReqs1286029375210293
📊 Page Load Benchmark Results

Current Commit: e9c3d5d | Date: 11/6/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±53ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±50ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±14ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 53ms 1.01s 1.32s 1.10s 1.32s
domContentLoaded 724ms 50ms 700ms 999ms 775ms 999ms
firstPaint 76ms 14ms 60ms 200ms 84ms 200ms
firstContentfulPaint 76ms 14ms 60ms 200ms 84ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.23 KiB (0.18%)
  • ui: 3.61 KiB (0.05%)
  • common: 22.92 KiB (0.26%)

(claim: Claim) => {
// add leading zero to claim number if it is less than 1000
const claimNumber = claim.claimNumber.toString().padStart(3, '0');
const claimNumber = claim.id.toString().padStart(3, '0');
Copy link
Contributor

@lionellbriones lionellbriones Nov 7, 2025

Choose a reason for hiding this comment

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

did you change the id to be a counter on claims ctrl? because the id is too long to show on UI eg. 05fa245a-1a4d-427a-b4bb-c8d409c05c38

we want to show it like Claims #1... on UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okie. Then we can use shortId I guess.

@lwin-kyaw
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Builds ready [de391d5]
📊 Page Load Benchmark Results

Current Commit: de391d5 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.00s (±74ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 698ms (±70ms) 🟢 | historical mean value: 716ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±12ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.00s 74ms 956ms 1.27s 1.23s 1.27s
domContentLoaded 698ms 70ms 659ms 956ms 918ms 956ms
firstPaint 76ms 12ms 64ms 180ms 84ms 180ms
firstContentfulPaint 76ms 12ms 64ms 180ms 84ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.12 KiB (0.17%)
  • ui: 1.49 KiB (0.02%)
  • common: 3.82 KiB (0.04%)

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@metamaskbot
Copy link
Collaborator

Builds ready [5fb972b]
UI Startup Metrics (1230 ± 109 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12301078196010912631411
load105494016499510791200
domContentLoaded104993516359410751189
domInteractive2514295321965
firstPaint54489130140210231154
backgroundConnect2312182537235245
firstReactRender27185172945
getState22794122549
initialActions003001
loadScripts823714140293849962
setupStore1062231217
numNetworkReqs1367319670
BrowserifyPower User HomeuiStartup19201713281129722262811
load1035884167521012341675
domContentLoaded1027880166421012281664
domInteractive281590204790
firstPaint83016616943889611694
backgroundConnect2322222589234258
firstReactRender26243122631
getState17514922019189220
initialActions102112
loadScripts804662141820410021418
setupStore13103461234
numNetworkReqs1177225172221251
WebpackStandard HomeuiStartup8447151169908561115
load61655493081608880
domContentLoaded60954990377604860
domInteractive171167101445
firstPaint20659906198207703
backgroundConnect251178132755
firstReactRender3018119123438
getState1153141316
initialActions001001
loadScripts60654689175601850
setupStore1263151325
numNetworkReqs1367319870
WebpackPower User HomeuiStartup12551143167612713211676
load660572926120803926
domContentLoaded640561885105713885
domInteractive231355163755
firstPaint34486930255575930
backgroundConnect52102536367253
firstReactRender27243122831
getState1419216021153160
initialActions001001
loadScripts636559875102703875
setupStore1263081730
numNetworkReqs1056816838151168
FirefoxBrowserifyStandard HomeuiStartup14761273197913015311700
load1256111315109113131452
domContentLoaded1256111315099113131452
domInteractive1183331951131235
firstPaint------
backgroundConnect4623216304999
firstReactRender26215852641
getState84778815
initialActions001001
loadScripts1228109314588412881381
setupStore157204211332
numNetworkReqs1267216859
BrowserifyPower User HomeuiStartup24912151388345225203883
load13981170191724116691917
domContentLoaded13981169191724116681917
domInteractive21588611172426611
firstPaint------
backgroundConnect15329676206123676
firstReactRender41326184861
getState1276939470123394
initialActions102112
loadScripts13541151184721415661847
setupStore2961193051119
numNetworkReqs1336932074200320
WebpackStandard HomeuiStartup16061419224715016281965
load13751218174610913931632
domContentLoaded13741218174610913931632
domInteractive1053242848116199
firstPaint------
backgroundConnect48201572851119
firstReactRender302278102963
getState10417021718
initialActions002001
loadScripts13421203170610213661554
setupStore14792141253
numNetworkReqs1366917765
WebpackPower User HomeuiStartup26212161338941330653389
load15651282189320417951893
domContentLoaded15651282189220417951892
domInteractive18154577159389577
firstPaint------
backgroundConnect14140330106279330
firstReactRender463290135090
getState1166917629135176
initialActions101111
loadScripts15051249185919417001859
setupStore4752596772259
numNetworkReqs1336730484227304
📊 Page Load Benchmark Results

Current Commit: 5fb972b | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±39ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 709ms (±36ms) 🟢 | historical mean value: 718ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 74ms (±11ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 39ms 995ms 1.31s 1.05s 1.31s
domContentLoaded 709ms 36ms 686ms 972ms 738ms 972ms
firstPaint 74ms 11ms 56ms 164ms 84ms 164ms
firstContentfulPaint 74ms 11ms 56ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.21 KiB (0.18%)
  • ui: 1.49 KiB (0.02%)
  • common: 3.82 KiB (0.04%)

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​metamask/​claims-controller@​0.1.0100100100100100

View full report

@metamaskbot
Copy link
Collaborator

Builds ready [bf156d9]
UI Startup Metrics (1250 ± 98 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1250109315999812971427
load107495513838911201251
domContentLoaded106795213718811171228
domInteractive221480141961
firstPaint63272138343010501232
backgroundConnect2352202679239255
firstReactRender29185483244
getState23768112648
initialActions001001
loadScripts838719112387886999
setupStore1262841321
numNetworkReqs1367620674
BrowserifyPower User HomeuiStartup20071775259925822982599
load1076932151219913121512
domContentLoaded1069924150519913061505
domInteractive311592234592
firstPaint74223215123809711512
backgroundConnect24622927414258274
firstReactRender29253832938
getState18215821717193217
initialActions001011
loadScripts835702126919510691269
setupStore1292331223
numNetworkReqs1397632482245324
WebpackStandard HomeuiStartup86571813841048691129
load629570114291622888
domContentLoaded622564112488616864
domInteractive17125491542
firstPaint191601128188205604
backgroundConnect261297152758
firstReactRender30186993639
getState1163841315
initialActions001001
loadScripts619562111485613853
setupStore1263641418
numNetworkReqs1367319870
WebpackPower User HomeuiStartup12281102170315812451703
load647568966129768966
domContentLoaded626557876110720876
domInteractive221358154258
firstPaint28479784237567784
backgroundConnect55918862134188
firstReactRender25232712627
getState1359115623149156
initialActions001001
loadScripts622555866106710866
setupStore1362782427
numNetworkReqs1107221946166219
FirefoxBrowserifyStandard HomeuiStartup14641290188011515471676
load1256110016249413271440
domContentLoaded1256110016249413271440
domInteractive1263630948138254
firstPaint------
backgroundConnect4223136214799
firstReactRender25205752541
getState63142611
initialActions001001
loadScripts1229108315999012901404
setupStore146198201130
numNetworkReqs1265715756
BrowserifyPower User HomeuiStartup23712078297927025252979
load13491143180420515291804
domContentLoaded13491143180420515291804
domInteractive21892632193469632
firstPaint------
backgroundConnect953131192207311
firstReactRender433070105170
getState1236419034141190
initialActions101011
loadScripts13211125176819814851768
setupStore3362515835251
numNetworkReqs1347223862207238
WebpackStandard HomeuiStartup15991407219114216291901
load13641187170610514021593
domContentLoaded13631187170610514021593
domInteractive983024036112172
firstPaint------
backgroundConnect49251692652114
firstReactRender29227383044
getState10417321717
initialActions001011
loadScripts13321171168510313791542
setupStore167239251255
numNetworkReqs1366717866
WebpackPower User HomeuiStartup25162198353541126693535
load14431274178117016261781
domContentLoaded14431274178117016261781
domInteractive15341380109246380
firstPaint------
backgroundConnect963328782129287
firstReactRender45346375063
getState1266419736164197
initialActions101011
loadScripts14131254174216315791742
setupStore2951754529175
numNetworkReqs1286331796235317
📊 Page Load Benchmark Results

Current Commit: bf156d9 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±71ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 738ms (±69ms) 🟢 | historical mean value: 719ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 71ms 1.01s 1.32s 1.27s 1.32s
domContentLoaded 738ms 69ms 700ms 1.00s 942ms 1.00s
firstPaint 76ms 10ms 60ms 164ms 84ms 164ms
firstContentfulPaint 76ms 10ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.42 KiB (0.18%)
  • ui: 1.49 KiB (0.02%)
  • common: 3.93 KiB (0.05%)

headers: {
Authorization: `Bearer ${accessToken}`,
},
headers,
Copy link

Choose a reason for hiding this comment

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

@lwin-kyaw : for multipart request, manually setting Content-Type: multipart/form-data without including boundary led to error "missing boundary" when fetch. You must remove "Content-Type: multipart/form-data" at controller or override it here and let browser add it automatically.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants