Skip to content

Commit c30529b

Browse files
Fix simulation
1 parent b442f46 commit c30529b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/snaps-simulation/src/simulation.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ export type RestrictedMiddlewareHooks = {
141141
* @returns The cryptographic functions to use for the client.
142142
*/
143143
getClientCryptography: () => CryptographicFunctions;
144+
145+
/**
146+
* A hook that returns metadata about a given Snap.
147+
*
148+
* @param snapId - The ID of a Snap.
149+
* @returns The metadata for the given Snap.
150+
*/
151+
getSnap: (snapId: string) => Snap;
144152
};
145153

146154
export type PermittedMiddlewareHooks = {
@@ -450,6 +458,7 @@ export function getRestrictedHooks(
450458
),
451459
getIsLocked: () => false,
452460
getClientCryptography: () => ({}),
461+
getSnap: getGetSnapImplementation(true),
453462
};
454463
}
455464

0 commit comments

Comments
 (0)