Skip to content

Commit 336ffd1

Browse files
committed
Add missing async
1 parent e15bdc3 commit 336ffd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/snaps-controllers/src/snaps/SnapController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ export class SnapController extends BaseController<
20512051
*/
20522052
async getSnapState(snapId: SnapId, encrypted: boolean): Promise<Json> {
20532053
const runtime = this.#getRuntimeExpect(snapId);
2054-
return await runtime.getStateMutex.runExclusive(() => {
2054+
return await runtime.getStateMutex.runExclusive(async () => {
20552055
const cachedState = encrypted ? runtime.state : runtime.unencryptedState;
20562056

20572057
if (cachedState !== undefined) {
@@ -2076,6 +2076,7 @@ export class SnapController extends BaseController<
20762076
}
20772077

20782078
const decrypted = await this.#decryptSnapState(snapId, state);
2079+
// eslint-disable-next-line require-atomic-updates
20792080
runtime.state = decrypted;
20802081

20812082
return decrypted;

0 commit comments

Comments
 (0)