From ce25973ee8ddac7edf972bd310da7977c8dbfc29 Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Wed, 18 Dec 2024 13:45:23 +0100 Subject: [PATCH] Add comment --- packages/snaps-simulation/src/middleware/engine.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/snaps-simulation/src/middleware/engine.ts b/packages/snaps-simulation/src/middleware/engine.ts index 0cc06a3d4a..20a39c3480 100644 --- a/packages/snaps-simulation/src/middleware/engine.ts +++ b/packages/snaps-simulation/src/middleware/engine.ts @@ -45,8 +45,12 @@ export function createJsonRpcEngine({ }: CreateJsonRpcEngineOptions) { const engine = new JsonRpcEngine(); engine.push(createMockMiddleware(store)); + + // The hooks here do not match the hooks used by the clients, so this + // middleware should not be used outside of the simulation environment. engine.push(createInternalMethodsMiddleware(restrictedHooks)); engine.push(createSnapsMethodMiddleware(true, permittedHooks)); + engine.push(permissionMiddleware); engine.push( createFetchMiddleware({