Skip to content

Commit c8e8a1b

Browse files
Remove async
1 parent 73a2ba4 commit c8e8a1b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

packages/snaps-simulation/src/simulation.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ describe('getPermittedHooks', () => {
476476
runSaga,
477477
);
478478

479-
await createInterface(content);
479+
createInterface(content);
480480

481481
expect(controllerMessenger.call).toHaveBeenCalledWith(
482482
'SnapInterfaceController:createInterface',
@@ -514,9 +514,9 @@ describe('getPermittedHooks', () => {
514514
runSaga,
515515
);
516516

517-
const id = await createInterface(text('foo'));
517+
const id = createInterface(text('foo'));
518518

519-
await updateInterface(id, content);
519+
updateInterface(id, content);
520520

521521
expect(controllerMessenger.call).toHaveBeenNthCalledWith(
522522
2,
@@ -555,7 +555,7 @@ describe('getPermittedHooks', () => {
555555
runSaga,
556556
);
557557

558-
const id = await createInterface(text('foo'));
558+
const id = createInterface(text('foo'));
559559

560560
const result = getInterfaceState(id);
561561

@@ -596,7 +596,7 @@ describe('getPermittedHooks', () => {
596596
runSaga,
597597
);
598598

599-
const id = await createInterface(text('foo'), { bar: 'baz' });
599+
const id = createInterface(text('foo'), { bar: 'baz' });
600600

601601
const result = getInterfaceContext(id);
602602

packages/snaps-simulation/src/simulation.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,7 @@ export type PermittedMiddlewareHooks = {
230230
* @param context - The context of the interface.
231231
* @returns The ID of the created interface.
232232
*/
233-
createInterface: (
234-
content: Component,
235-
context?: InterfaceContext,
236-
) => Promise<string>;
233+
createInterface: (content: Component, context?: InterfaceContext) => string;
237234

238235
/**
239236
* A hook that updates an interface for the Snap. This hook is bound to the
@@ -242,7 +239,7 @@ export type PermittedMiddlewareHooks = {
242239
* @param id - The ID of the interface to update.
243240
* @param content - The content of the interface.
244241
*/
245-
updateInterface: (id: string, content: Component) => Promise<void>;
242+
updateInterface: (id: string, content: Component) => void;
246243

247244
/**
248245
* A hook that gets the state of an interface for the Snap. This hook is bound
@@ -477,13 +474,13 @@ export function getPermittedHooks(
477474
getSnapFile: async (path: string, encoding: AuxiliaryFileEncoding) =>
478475
await getSnapFile(snapFiles.auxiliaryFiles, path, encoding),
479476

480-
createInterface: async (...args) =>
477+
createInterface: (...args) =>
481478
controllerMessenger.call(
482479
'SnapInterfaceController:createInterface',
483480
snapId,
484481
...args,
485482
),
486-
updateInterface: async (...args) =>
483+
updateInterface: (...args) =>
487484
controllerMessenger.call(
488485
'SnapInterfaceController:updateInterface',
489486
snapId,

0 commit comments

Comments
 (0)