diff --git a/packages/snaps-execution-environments/lavamoat/browserify/iframe/policy.json b/packages/snaps-execution-environments/lavamoat/browserify/iframe/policy.json index b251904ff1..dae83f8c30 100644 --- a/packages/snaps-execution-environments/lavamoat/browserify/iframe/policy.json +++ b/packages/snaps-execution-environments/lavamoat/browserify/iframe/policy.json @@ -42,8 +42,8 @@ "console": true }, "packages": { + "@metamask/json-rpc-engine": true, "@metamask/object-multiplex": true, - "@metamask/providers>@metamask/json-rpc-engine": true, "@metamask/providers>@metamask/json-rpc-middleware-stream": true, "@metamask/providers>@metamask/safe-event-emitter": true, "@metamask/providers>is-stream": true, @@ -52,13 +52,6 @@ "readable-stream": true } }, - "@metamask/providers>@metamask/json-rpc-engine": { - "packages": { - "@metamask/providers>@metamask/safe-event-emitter": true, - "@metamask/rpc-errors": true, - "@metamask/utils": true - } - }, "@metamask/providers>@metamask/json-rpc-middleware-stream": { "globals": { "console.warn": true, @@ -66,6 +59,7 @@ }, "packages": { "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, "readable-stream": true } }, diff --git a/packages/snaps-execution-environments/lavamoat/browserify/node-process/policy.json b/packages/snaps-execution-environments/lavamoat/browserify/node-process/policy.json index 760ede1af5..c448fad6ed 100644 --- a/packages/snaps-execution-environments/lavamoat/browserify/node-process/policy.json +++ b/packages/snaps-execution-environments/lavamoat/browserify/node-process/policy.json @@ -49,8 +49,8 @@ "console": true }, "packages": { + "@metamask/json-rpc-engine": true, "@metamask/object-multiplex": true, - "@metamask/providers>@metamask/json-rpc-engine": true, "@metamask/providers>@metamask/json-rpc-middleware-stream": true, "@metamask/providers>@metamask/safe-event-emitter": true, "@metamask/providers>is-stream": true, @@ -59,13 +59,6 @@ "readable-stream": true } }, - "@metamask/providers>@metamask/json-rpc-engine": { - "packages": { - "@metamask/providers>@metamask/safe-event-emitter": true, - "@metamask/rpc-errors": true, - "@metamask/utils": true - } - }, "@metamask/providers>@metamask/json-rpc-middleware-stream": { "globals": { "console.warn": true, @@ -73,6 +66,7 @@ }, "packages": { "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, "readable-stream": true } }, diff --git a/packages/snaps-execution-environments/lavamoat/browserify/node-thread/policy.json b/packages/snaps-execution-environments/lavamoat/browserify/node-thread/policy.json index 760ede1af5..c448fad6ed 100644 --- a/packages/snaps-execution-environments/lavamoat/browserify/node-thread/policy.json +++ b/packages/snaps-execution-environments/lavamoat/browserify/node-thread/policy.json @@ -49,8 +49,8 @@ "console": true }, "packages": { + "@metamask/json-rpc-engine": true, "@metamask/object-multiplex": true, - "@metamask/providers>@metamask/json-rpc-engine": true, "@metamask/providers>@metamask/json-rpc-middleware-stream": true, "@metamask/providers>@metamask/safe-event-emitter": true, "@metamask/providers>is-stream": true, @@ -59,13 +59,6 @@ "readable-stream": true } }, - "@metamask/providers>@metamask/json-rpc-engine": { - "packages": { - "@metamask/providers>@metamask/safe-event-emitter": true, - "@metamask/rpc-errors": true, - "@metamask/utils": true - } - }, "@metamask/providers>@metamask/json-rpc-middleware-stream": { "globals": { "console.warn": true, @@ -73,6 +66,7 @@ }, "packages": { "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, "readable-stream": true } }, diff --git a/packages/snaps-execution-environments/lavamoat/browserify/worker-executor/policy.json b/packages/snaps-execution-environments/lavamoat/browserify/worker-executor/policy.json index b251904ff1..dae83f8c30 100644 --- a/packages/snaps-execution-environments/lavamoat/browserify/worker-executor/policy.json +++ b/packages/snaps-execution-environments/lavamoat/browserify/worker-executor/policy.json @@ -42,8 +42,8 @@ "console": true }, "packages": { + "@metamask/json-rpc-engine": true, "@metamask/object-multiplex": true, - "@metamask/providers>@metamask/json-rpc-engine": true, "@metamask/providers>@metamask/json-rpc-middleware-stream": true, "@metamask/providers>@metamask/safe-event-emitter": true, "@metamask/providers>is-stream": true, @@ -52,13 +52,6 @@ "readable-stream": true } }, - "@metamask/providers>@metamask/json-rpc-engine": { - "packages": { - "@metamask/providers>@metamask/safe-event-emitter": true, - "@metamask/rpc-errors": true, - "@metamask/utils": true - } - }, "@metamask/providers>@metamask/json-rpc-middleware-stream": { "globals": { "console.warn": true, @@ -66,6 +59,7 @@ }, "packages": { "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, "readable-stream": true } }, diff --git a/packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts b/packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts index cabd40c57d..1395f08b05 100644 --- a/packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts +++ b/packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts @@ -2,7 +2,7 @@ /// import { createIdRemapMiddleware } from '@metamask/json-rpc-engine'; import type { RequestArguments } from '@metamask/providers'; -import { StreamProvider } from '@metamask/providers/dist/StreamProvider'; +import { StreamProvider } from '@metamask/providers/dist/StreamProvider.cjs'; import { errorCodes, rpcErrors, serializeError } from '@metamask/rpc-errors'; import type { SnapsProvider } from '@metamask/snaps-sdk'; import { getErrorData } from '@metamask/snaps-sdk'; diff --git a/packages/snaps-execution-environments/src/common/test-utils/endowments.ts b/packages/snaps-execution-environments/src/common/test-utils/endowments.ts index 63baeb8379..6b519dfd97 100644 --- a/packages/snaps-execution-environments/src/common/test-utils/endowments.ts +++ b/packages/snaps-execution-environments/src/common/test-utils/endowments.ts @@ -3,7 +3,7 @@ import { walk } from '@lavamoat/lavatube'; import { createIdRemapMiddleware } from '@metamask/json-rpc-engine'; import ObjectMultiplex from '@metamask/object-multiplex'; import { StreamProvider } from '@metamask/providers'; -import type { RequestArguments } from '@metamask/providers/dist/BaseProvider'; +import type { RequestArguments } from '@metamask/providers/dist/BaseProvider.d.cts'; import { SNAP_STREAM_NAMES } from '@metamask/snaps-utils'; import { diff --git a/packages/snaps-execution-environments/src/common/test-utils/logger.ts b/packages/snaps-execution-environments/src/common/test-utils/logger.ts index f86e2a3740..b62f12b8ba 100644 --- a/packages/snaps-execution-environments/src/common/test-utils/logger.ts +++ b/packages/snaps-execution-environments/src/common/test-utils/logger.ts @@ -1,4 +1,4 @@ -import type { ConsoleLike } from '@metamask/providers/dist/utils'; +import type { ConsoleLike } from '@metamask/providers/dist/utils.cjs'; export const SILENT_LOGGER: ConsoleLike = { log: () => undefined, diff --git a/packages/test-snaps/src/api.ts b/packages/test-snaps/src/api.ts index 913a98de23..e68a141e2a 100644 --- a/packages/test-snaps/src/api.ts +++ b/packages/test-snaps/src/api.ts @@ -1,5 +1,5 @@ import type { MetaMaskInpageProvider } from '@metamask/providers'; -import type { RequestArguments } from '@metamask/providers/dist/BaseProvider'; +import type { RequestArguments } from '@metamask/providers/dist/BaseProvider.d.cts'; import { logError } from '@metamask/snaps-utils'; import type { JsonRpcError, JsonRpcParams } from '@metamask/utils'; import type { BaseQueryFn } from '@reduxjs/toolkit/query/react';