Skip to content

Commit ecfe6cf

Browse files
committed
Add name and state to ExecutionService type
1 parent 361cd5b commit ecfe6cf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/snaps-controllers/src/services/AbstractExecutionService.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export type TerminateJobArgs<WorkerType> = Partial<Job<WorkerType>> &
6464
export abstract class AbstractExecutionService<WorkerType>
6565
implements ExecutionService
6666
{
67+
name = 'ExecutionService' as const;
68+
69+
state = null;
70+
6771
#snapRpcHooks: Map<string, SnapRpcHook>;
6872

6973
// Cannot be hash private yet because of tests.

packages/snaps-controllers/src/services/ExecutionService.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ type HandleRpcRequest = (
1212
) => Promise<unknown>;
1313

1414
export interface ExecutionService {
15+
// These fields are required for modular initialisation of the execution
16+
// service in the MetaMask extension.
17+
name: 'ExecutionService';
18+
state: null;
19+
1520
terminateSnap: TerminateSnap;
1621
terminateAllSnaps: TerminateAll;
1722
executeSnap: ExecuteSnap;

0 commit comments

Comments
 (0)