diff --git a/app/core/BackgroundBridge/BackgroundBridge.js b/app/core/BackgroundBridge/BackgroundBridge.js index 3af46b160d9..0305cfb53fc 100644 --- a/app/core/BackgroundBridge/BackgroundBridge.js +++ b/app/core/BackgroundBridge/BackgroundBridge.js @@ -16,7 +16,6 @@ import Engine from '../Engine'; import { createSanitizationMiddleware } from '../SanitizationMiddleware'; import Logger from '../../util/Logger'; import AppConstants from '../AppConstants'; -import { createEngineStream } from 'json-rpc-middleware-stream'; import RemotePort from './RemotePort'; import WalletConnectPort from './WalletConnectPort'; import Port from './Port'; @@ -29,6 +28,7 @@ import { SubjectType } from '@metamask/permission-controller'; const createFilterMiddleware = require('@metamask/eth-json-rpc-filters'); const createSubscriptionManager = require('@metamask/eth-json-rpc-filters/subscriptionManager'); const { providerAsMiddleware } = require('@metamask/eth-json-rpc-middleware'); +import { createEngineStream } from '@metamask/json-rpc-middleware-stream'; const pump = require('pump'); // eslint-disable-next-line import/no-nodejs-modules const EventEmitter = require('events').EventEmitter; diff --git a/app/core/Snaps/SnapBridge.ts b/app/core/Snaps/SnapBridge.ts index 47c067f155c..debaf7c75de 100644 --- a/app/core/Snaps/SnapBridge.ts +++ b/app/core/Snaps/SnapBridge.ts @@ -11,7 +11,7 @@ import { createEventEmitterProxy, } from '@metamask/swappable-obj-proxy'; import { JsonRpcEngine } from 'json-rpc-engine'; -import { createEngineStream } from 'json-rpc-middleware-stream'; +import { createEngineStream } from '@metamask/json-rpc-middleware-stream'; import { NetworksChainId } from '@metamask/controller-utils'; import Engine from '../Engine'; diff --git a/package.json b/package.json index 84ae09276d7..5a6dd06a334 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ "@metamask/ethjs-query": "^0.7.1", "@metamask/ethjs-unit": "^0.3.0", "@metamask/gas-fee-controller": "^18.0.0", + "@metamask/json-rpc-middleware-stream": "^8.0.2", "@metamask/key-tree": "^9.0.0", "@metamask/keyring-api": "^8.1.0", "@metamask/keyring-controller": "^17.2.1", @@ -252,7 +253,6 @@ "humanize-duration": "^3.27.2", "is-url": "^1.2.4", "json-rpc-engine": "^6.1.0", - "json-rpc-middleware-stream": "^4.2.3", "lodash": "^4.17.21", "lottie-ios": "3.4.1", "lottie-react-native": "5.1.5", @@ -370,7 +370,7 @@ "@metamask/eslint-plugin-design-tokens": "^1.0.0", "@metamask/mobile-provider": "^3.0.0", "@metamask/object-multiplex": "^1.1.0", - "@metamask/providers": "^13.1.0", + "@metamask/providers": "^16.1.0", "@metamask/test-dapp": "^8.9.0", "@octokit/rest": "^21.0.0", "@open-rpc/mock-server": "^1.7.5", diff --git a/yarn.lock b/yarn.lock index 06a9d551ce3..b3eb55c5f38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5243,24 +5243,7 @@ loglevel "^1.8.1" siwe "^2.3.2" -"@metamask/providers@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-13.1.0.tgz#c5aef8e7073e097e6693cffc5f463b0632e1f1fd" - integrity sha512-/2Ti81CwZ/9LLpAm9Law+7z1PYbR3EiNXNKCbkppOfxxR1MbC2ps8/GFTjk7UHEMhAVG4k9ziGW8mMsutNVxmA== - dependencies: - "@metamask/json-rpc-engine" "^7.1.1" - "@metamask/object-multiplex" "^1.1.0" - "@metamask/rpc-errors" "^6.0.0" - "@metamask/safe-event-emitter" "^3.0.0" - "@metamask/utils" "^8.1.0" - detect-browser "^5.2.0" - extension-port-stream "^2.1.1" - fast-deep-equal "^3.1.3" - is-stream "^2.0.0" - json-rpc-middleware-stream "^4.2.1" - webextension-polyfill "^0.10.0" - -"@metamask/providers@^16.0.0": +"@metamask/providers@^16.0.0", "@metamask/providers@^16.1.0": version "16.1.0" resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-16.1.0.tgz#7da593d17c541580fa3beab8d9d8a9b9ce19ea07" integrity sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g== @@ -17523,13 +17506,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -extension-port-stream@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-2.1.1.tgz#ec11f2a5ed95655d8c40805d7cb0c39939ee9ef4" - integrity sha512-qknp5o5rj2J9CRKfVB8KJr+uXQlrojNZzdESUPhKYLXf97TPcGf6qWWKmpsNNtUyOdzFhab1ON0jzouNxHHvow== - dependencies: - webextension-polyfill ">=0.10.0 <1.0" - extension-port-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-3.0.0.tgz#00a7185fe2322708a36ed24843c81bd754925fef" @@ -20919,15 +20895,6 @@ json-rpc-engine@^6.1.0: "@metamask/safe-event-emitter" "^2.0.0" eth-rpc-errors "^4.0.2" -json-rpc-middleware-stream@^4.2.1, json-rpc-middleware-stream@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/json-rpc-middleware-stream/-/json-rpc-middleware-stream-4.2.3.tgz#08340846ffaa2a60287930773546eb4b7f7dbba2" - integrity sha512-4iFb0yffm5vo3eFKDbQgke9o17XBcLQ2c3sONrXSbcOLzP8LTojqo8hRGVgtJShhm5q4ZDSNq039fAx9o65E1w== - dependencies: - "@metamask/safe-event-emitter" "^3.0.0" - json-rpc-engine "^6.1.0" - readable-stream "^2.3.3" - json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8"