Skip to content

chore: Enable token permissions in production build#40813

Merged
MoMannn merged 4 commits intomainfrom
chore/enable_token_permissions
Mar 12, 2026
Merged

chore: Enable token permissions in production build#40813
MoMannn merged 4 commits intomainfrom
chore/enable_token_permissions

Conversation

@jeffsmale90
Copy link
Contributor

@jeffsmale90 jeffsmale90 commented Mar 11, 2026

Description

Enables the following token permissions in production build:

  • erc20-token-stream
  • native-token-stream
  • erc20-token-periodic
  • native-token-periodic

Bumps the Advanced Permissions dependencies:

  • @metmask/gator-permissions-snap from ^1.1.1 to 1.2.0
  • @metamask/permissions-kernel-snap from ^1.0.0 to ^1.1.0
  • @metamask/gator-permissions-controller from ^2.0.0 to ^2.1.0

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Enables token permissions via EIP-7715

Related issues

Fixes:

Manual testing steps

  1. Go to site in https://github.com/MetaMask/snap-7715-permissions/tree/main/packages/site
  2. Request each permission type

Expect the permission requesting flow to work as expected

  1. After granting permissions go to Dapp Permissions
  2. Expect granted permissions to appear

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

Medium Risk
Enables additional EIP-7715 permission types in the default build and upgrades the related snap/controller packages, which could affect permission-request flows at runtime. Risk is limited to the Advanced Permissions feature area but impacts production builds.

Overview
Enables EIP-7715 token streaming and periodic permission types in production by expanding GATOR_ENABLED_PERMISSION_TYPES beyond just ERC20 revocation.

Bumps Advanced Permissions dependencies to newer versions (@metamask/gator-permissions-controller ^2.1.0, @metamask/gator-permissions-snap ^1.2.0, @metamask/permissions-kernel-snap ^1.1.0) and updates yarn.lock accordingly.

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

@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 metamaskbot added the team-delegation MetaMask Delegation Team label Mar 11, 2026
@socket-security
Copy link

socket-security bot commented Mar 11, 2026

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​permissions-kernel-snap@​1.0.0 ⏵ 1.1.097 +11006094 +1100
Updated@​metamask/​gator-permissions-snap@​1.1.1 ⏵ 1.2.0971006296100
Updated@​metamask/​gator-permissions-controller@​2.0.0 ⏵ 2.1.09910087 +197100

View full report

@jeffsmale90 jeffsmale90 changed the title Chore/enable token permissions chore: Enable token permissions in production build Mar 11, 2026
- @metamask/gator-permissions-snap from ^1.1.1 to ^1.2.0
- @metamask/permissions-kernel-snap from ^1.0.0 to ^1.1.0
@jeffsmale90 jeffsmale90 force-pushed the chore/enable_token_permissions branch from 739d07f to 5cac273 Compare March 11, 2026 17:53
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 11, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 11, 2026

Builds ready [5cac273]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29426933629324336
total29426933629324336
Confirm Txconfirm_tx602960206042860306042
total602960206042860306042
Bridge User Actionsbridge_load_page22619425922232259
bridge_load_asset_picker24420528929258289
bridge_search_token7587527624762762
total1225121412421212421242
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14441195185711214811655
load119799414359412371379
domContentLoaded119198914229312321375
domInteractive2916101192583
firstPaint1407238571193261
backgroundConnect21519525812220240
firstReactRender19133032026
initialActions106125
loadScripts99179612169110231166
setupStore1364551519
numNetworkReqs362794183681
Power User HomeuiStartup61532006180203362739413659
load13131139202113713471577
domContentLoaded12961132199313113191546
domInteractive3520142233481
firstPaint2019552487262357
backgroundConnect2368318145153213256410647
firstReactRender281910393038
initialActions105113
loadScripts1069924170912210891294
setupStore1775591937
numNetworkReqs1397527342147246
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2242192325223232
srpButtonToSrpForm100961074102107
confirmSrpToPwForm23222412424
pwFormToMetricsScreen16161711617
metricsToWalletReadyScreen18172121921
doneButtonToHomeScreen66460877164651771
openAccountMenuToAccountListLoaded292829192936729362936
total4014391341248140854124
Onboarding New WalletcreateWalletToSocialScreen2212182263223226
srpButtonToPwForm1081051102108110
createPwToRecoveryScreen888088
skipBackupToMetricsScreen37363813738
agreeButtonToOnboardingSuccess16161601616
doneButtonToAssetList48847750611488506
total8888858933893893
Asset DetailsassetClickToPriceChart1199515520127155
total1199515520127155
Solana Asset DetailsassetClickToPriceChart81788428184
total81788428184
Import Srp HomeloginToHomeScreen2288225423172322952317
openAccountMenuAfterLogin67547797277
homeAfterImportWithNewWallet23672202256214024532562
total47474573492212048004922
Send TransactionsopenSendPageFromHome28233762937
selectTokenToSendFormLoaded33323413434
reviewTransactionToConfirmationPage1332850179733414791797
total1400900190035115401900
SwapopenSwapPageFromHome22222302323
fetchAndDisplaySwapQuotes268826842690226892690
total271027072712227112712
🌐 Dapp Page Load Benchmarks

Current Commit: 5cac273 | Date: 3/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±78ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 752ms (±87ms) 🟢 | historical mean value: 740ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 92ms (±129ms) 🟢 | historical mean value: 82ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 78ms 1.01s 1.40s 1.29s 1.40s
domContentLoaded 752ms 87ms 707ms 1.30s 965ms 1.30s
firstPaint 92ms 129ms 64ms 1.37s 88ms 1.37s
firstContentfulPaint 92ms 129ms 64ms 1.37s 88ms 1.37s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.24 KiB (0.16%)
  • ui: 3 Bytes (0%)
  • common: 104 Bytes (0%)

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@jeffsmale90 jeffsmale90 marked this pull request as ready for review March 11, 2026 19:40
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 11, 2026

Builds ready [3ab8169]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2712622808277280
total2712622808277280
Confirm Txconfirm_tx602060066029960276029
total602060066029960276029
Bridge User Actionsbridge_load_page23519429235245292
bridge_load_asset_picker23615329149281291
bridge_search_token7397307518741751
total1204110213187512361318
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14431209178611214851629
load1204100715369912621375
domContentLoaded1196100415329912561370
domInteractive2917101182581
firstPaint1396940470174259
backgroundConnect21719728814223237
firstReactRender20134352130
initialActions207125
loadScripts99578813279810391163
setupStore1363151622
numNetworkReqs362787173079
Power User HomeuiStartup5842192217849295368418934
load13231143165611913761561
domContentLoaded13051137163411113621525
domInteractive3721290323481
firstPaint206811202131275339
backgroundConnect226731414752275031535276
firstReactRender3020296273039
initialActions105112
loadScripts1070912136510311201282
setupStore17687102032
numNetworkReqs1387527540146229
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192192200219220
srpButtonToSrpForm93929419394
confirmSrpToPwForm21212202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151601616
doneButtonToHomeScreen5995906159598615
openAccountMenuToAccountListLoaded2918290429361229262936
total3880386239001438843900
Onboarding New WalletcreateWalletToSocialScreen2192192190219219
srpButtonToPwForm1091061112111111
createPwToRecoveryScreen889089
skipBackupToMetricsScreen35343613536
agreeButtonToOnboardingSuccess16161601616
doneButtonToAssetList578484781113623781
total968865117011210071170
Asset DetailsassetClickToPriceChart715291158191
total715291158191
Solana Asset DetailsassetClickToPriceChart79718768487
total79718768487
Import Srp HomeloginToHomeScreen2340222324227323752422
openAccountMenuAfterLogin80541031794103
homeAfterImportWithNewWallet2537242125936825732593
total4951486050497850065049
Send TransactionsopenSendPageFromHome472170206570
selectTokenToSendFormLoaded311746124246
reviewTransactionToConfirmationPage1241845179537415181795
total1319883189039616131890
SwapopenSwapPageFromHome23222512325
fetchAndDisplaySwapQuotes268426752692626852692
total2721269827462027422746
🌐 Dapp Page Load Benchmarks

Current Commit: 3ab8169 | Date: 3/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.01s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 708ms (±70ms) 🟢 | historical mean value: 740ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 80ms (±13ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.01s 73ms 964ms 1.30s 1.24s 1.30s
domContentLoaded 708ms 70ms 671ms 981ms 923ms 981ms
firstPaint 80ms 13ms 68ms 196ms 96ms 196ms
firstContentfulPaint 80ms 13ms 68ms 196ms 96ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 8.24 KiB (0.16%)
  • ui: 26.28 KiB (0.31%)
  • common: 635 Bytes (0.01%)

@jeffsmale90 jeffsmale90 enabled auto-merge March 11, 2026 21:46
@jeffsmale90 jeffsmale90 added this pull request to the merge queue Mar 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@MoMannn MoMannn added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit f107536 Mar 12, 2026
189 checks passed
@MoMannn MoMannn deleted the chore/enable_token_permissions branch March 12, 2026 08:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2026
@metamaskbot metamaskbot added the release-13.23.0 Issue or pull request that will be included in release 13.23.0 label Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.23.0 Issue or pull request that will be included in release 13.23.0 size-XS team-delegation MetaMask Delegation Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants