feat(gator-permissions): add Gator Permissions deep link#40995
feat(gator-permissions): add Gator Permissions deep link#40995
Conversation
|
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. |
…ken-transfer path
Builds ready [bdbfb72]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
✨ Files requiring CODEOWNER review ✨🔒 @MetaMask/extension-security-team (1 files, +7 -0)
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
Builds ready [3bea1d7]
⚡ Performance Benchmarks
Dapp page load benchmarks: data not available. Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
|
||
| const encodedSite = encodeURIComponent(site); | ||
| return { | ||
| path: `/gator-permissions/${type}/${encodedSite}`, |
There was a problem hiding this comment.
This is definitely only a nit: should we lean into the public naming /advanced-permissions/ ?
|
Due to our decision to use a different approach to display existing permissions MetaMask/snap-7715-permissions#288, we are going to close this PR. |




Description
This PR adds support for the Gator Permissions deep link route, allowing users to navigate directly to the Gator Permissions page with specified parameters. The implementation includes a new route handler that validates and processes
typeandsitequery parameters, with comprehensive validation to ensure only valid URLs are passed through.Key features:
/gator-permissionsroute with query parameter validationtoken-transfertype parameterChangelog
CHANGELOG entry: Added Gator Permissions deep link support for token transfer operations
Related issues
Fixes:
Manual testing steps
yarn start:flaskor appropriate build commandhttps://link.metamask.io/gator-permissions?type=token-transfer&site=http://localhost:8000Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: adds a new deep-link route with strict parameter validation and test coverage, with no changes to existing routing behavior beyond registering the new path.
Overview
Adds a new deep link route
'/gator-permissions'that resolves to/gator-permissions/:type/:site, validating requiredtype(currently onlytoken-transfer) andsite(must be anhttp/httpsorigin) before constructing the destination path.Updates i18n strings for the new page title key and registers the route in the deep-link routes index, with comprehensive unit tests covering valid, missing, and invalid query parameter cases.
Extends
.github/CODEOWNERSto assign the Delegation team ownership for the new gator-permissions areas.Written by Cursor Bugbot for commit 3bea1d7. This will update automatically on new commits. Configure here.