Skip to content

Commit 2fffd78

Browse files
authored
fix: Add snap_experimentalProviderRequest to unrestricted methods (#30525)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This adds `snap_experimentalProviderRequest` to the list of unrestricted methods. > [!NOTE] > This method is experimental, and will be removed in a future update. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30525?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
1 parent 0ad093f commit 2fffd78

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/scripts/controllers/permissions/specifications.js

+1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ export const unrestrictedMethods = Object.freeze([
180180
'snap_scheduleBackgroundEvent',
181181
'snap_cancelBackgroundEvent',
182182
'snap_getBackgroundEvents',
183+
'snap_experimentalProviderRequest',
183184
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
184185
'metamaskinstitutional_authenticate',
185186
'metamaskinstitutional_reauthenticate',

app/scripts/metamask-controller.js

+8
Original file line numberDiff line numberDiff line change
@@ -6455,6 +6455,14 @@ export default class MetamaskController extends EventEmitter {
64556455
'CronjobController:getBackgroundEvents',
64566456
origin,
64576457
),
6458+
getNetworkConfigurationByChainId: this.controllerMessenger.call.bind(
6459+
this.controllerMessenger,
6460+
'NetworkController:getNetworkConfigurationByChainId',
6461+
),
6462+
getNetworkClientById: this.controllerMessenger.call.bind(
6463+
this.controllerMessenger,
6464+
'NetworkController:getNetworkClientById',
6465+
),
64586466
///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps)
64596467
handleSnapRpcRequest: (args) =>
64606468
this.handleSnapRequest({ ...args, origin }),

0 commit comments

Comments
 (0)