Skip to content

Commit d021cc4

Browse files
authored
Fix incorrect default Gator Permissions SnapId (#6546)
Fixes the default configuration for snapId, by adding the missing `npm:` prefix ## Explanation `GatorPermissionsController` provides a default value for `permissionsProviderSnapId`, but previously this incorrectly omitted the `npm:` prefix. This change adds the prefix. Changelog: > Corrects the default Permissions Provider SnapId configuration value for the `GatorPermissionsController` which was previously missing the `npm:` prefix. ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - N/A I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - N/A I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - N/A I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
1 parent dac2789 commit d021cc4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/gator-permissions-controller/src/GatorPermissionContoller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('GatorPermissionsController', () => {
121121
});
122122

123123
expect(controller.permissionsProviderSnapId).toBe(
124-
'@metamask/gator-permissions-snap' as SnapId,
124+
'npm:@metamask/gator-permissions-snap' as SnapId,
125125
);
126126
expect(controller.state.isGatorPermissionsEnabled).toBe(false);
127127
expect(controller.state.isFetchingGatorPermissions).toBe(false);
@@ -409,7 +409,7 @@ describe('GatorPermissionsController', () => {
409409
).toMatchInlineSnapshot(`
410410
Object {
411411
"gatorPermissionsMapSerialized": "{\\"native-token-stream\\":{},\\"native-token-periodic\\":{},\\"erc20-token-stream\\":{},\\"erc20-token-periodic\\":{},\\"other\\":{}}",
412-
"gatorPermissionsProviderSnapId": "@metamask/gator-permissions-snap",
412+
"gatorPermissionsProviderSnapId": "npm:@metamask/gator-permissions-snap",
413413
"isFetchingGatorPermissions": false,
414414
"isGatorPermissionsEnabled": false,
415415
}

packages/gator-permissions-controller/src/GatorPermissionsController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const controllerName = 'GatorPermissionsController';
3535

3636
// Default value for the gator permissions provider snap id
3737
const defaultGatorPermissionsProviderSnapId =
38-
'@metamask/gator-permissions-snap' as SnapId;
38+
'npm:@metamask/gator-permissions-snap' as SnapId;
3939

4040
const defaultGatorPermissionsMap: GatorPermissionsMap = {
4141
'native-token-stream': {},

0 commit comments

Comments
 (0)