fix: wallet_requestExecutionPermissions requests should reject any requests that include chains that don't support EIP-7702#40152
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. |
c64b3e8 to
d918704
Compare
d918704 to
01245c0
Compare
01245c0 to
707b676
Compare
wallet_requestExecutionPermissions requests should reject any requests that include chains that don't support EIP-7702
Builds ready [707b676]
UI Startup Metrics (1433 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [65b6e8a]
UI Startup Metrics (1441 ± 116 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
65b6e8a to
70d5489
Compare
70d5489 to
38858c0
Compare
|
Health check is failing because of #40221 |
Builds ready [d181c28]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d181c28]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
d181c28 to
f5cea4c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
- updates fixtureBuilder with withRemoteFeatureFlagController function
Builds ready [f5cea4c]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
f5cea4c to
f166caf
Compare
Builds ready [f166caf]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
…s overridden immediately when the controller is initialized anyways. Use mockttp to mock the remote feature flags http request instead.
Builds ready [00dfc2e]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [48bf8bd]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Builds ready [438a753]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [ffc7e8e]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|



Description
Presently when a
wallet_requestExecutionPermissionsRPC is served for a chain that doesn't support EIP-7702, we allow the user to sign the permission, and it is returned to the dapp.This results in an expectation that the dapp will serve the requested feature - but the permission is not valid, as the account may not be upgraded on the chain.
This PR adds additional validation to the RPC before forwarding it to the Permissions Kernel snap.
Changelog
CHANGELOG entry: Reject
wallet_requestExecutionPermissionsrequests that include chains that do not support EIP-7702Related issues
Fixes:
Manual testing steps
VITE_SUPPORTED_CHAINS=1,59144Expect: Permission request is shown in the wallet
Expect: The request is rejected
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes JSON-RPC behavior for
wallet_requestExecutionPermissionsby hard-rejecting requests containing unsupportedchainIds based on remote feature flags, which could affect dapps relying on previous permissive behavior. Logic is straightforward but touches permission-gating and feature-flag-driven chain support.Overview
Pre-validates
wallet_requestExecutionPermissionsrequests to reject any params that include achainIdnot listed in theconfirmations_eip_7702.supportedChainsremote feature flag, returningmethodNotSupportedbefore forwarding to the Permissions Kernel snap.Adds
getEip7702SupportedChainsineip7702-support-utilsto read supported chains from remote feature flags, and extends unit + e2e coverage (including mocking the client-config flags API) to ensure unsupported chains are blocked and matching is case-insensitive.Written by Cursor Bugbot for commit ffc7e8e. This will update automatically on new commits. Configure here.