Skip to content

Commit f871a57

Browse files
committed
Update getSnap hook
1 parent e9d5faa commit f871a57

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/snaps-simulation/src/methods/hooks/get-snap.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import { SnapStatus } from '@metamask/snaps-utils';
44
import type { SemVerVersion } from '@metamask/utils';
55

66
/**
7-
* Get a method that can be used to track an event.
7+
* Get a method that gets a Snap by its ID.
88
*
99
* @param preinstalled - Whether the Snap is preinstalled. If `true`, the Snap
1010
* will be returned as a preinstalled Snap.
11-
* @returns A method that can be used to track an event.
11+
* @returns A method that gets a Snap by its ID. It will always return a mock
12+
* Snap for simulation purposes.
1213
*/
1314
export function getGetSnapImplementation(preinstalled: boolean = true) {
14-
return (): Snap => {
15+
return (_snapId: string): Snap => {
1516
// This is a mock Snap for simulation purposes. Most of the fields are not
1617
// actually used, but returned for type-safety sake.
1718
return {

0 commit comments

Comments
 (0)