mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
Check for blocked snaps on extension startup (#20336)
* allow `SnapController` to call `SnapsRegistry:update` * call `SnapController:updateBlockedSnaps` on extension startup * only check if at least one snap is installed
This commit is contained in:
parent
7447fe14a9
commit
c8f2e8e82d
@ -821,6 +821,13 @@ export function setupController(
|
||||
});
|
||||
}
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
|
||||
///: BEGIN:ONLY_INCLUDE_IN(snaps)
|
||||
// Updates the snaps registry and check for newly blocked snaps to block if the user has at least one snap installed.
|
||||
if (Object.keys(controller.snapController.state.snaps).length > 0) {
|
||||
controller.snapController.updateBlockedSnaps();
|
||||
}
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -959,6 +959,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
'ExecutionService:handleRpcRequest',
|
||||
'SnapsRegistry:get',
|
||||
'SnapsRegistry:getMetadata',
|
||||
'SnapsRegistry:update',
|
||||
],
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user