mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +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
ad919026ab
commit
36c0dfb1f2
@ -801,6 +801,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
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -986,6 +986,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
'ExecutionService:handleRpcRequest',
|
||||
'SnapsRegistry:get',
|
||||
'SnapsRegistry:getMetadata',
|
||||
'SnapsRegistry:update',
|
||||
],
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user