provider - network - restore block-ref-rewrite middleware references

feature/default_network_editable
kumavis 6 years ago
parent 354f8c0d7d
commit fe82c4a9fb
  1. 4
      app/scripts/controllers/network/createJsonRpcClient.js
  2. 4
      app/scripts/controllers/network/createLocalhostClient.js
  3. 6
      package-lock.json
  4. 2
      package.json

@ -1,6 +1,6 @@
const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware') const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware')
const createFetchMiddleware = require('eth-json-rpc-middleware/fetch') const createFetchMiddleware = require('eth-json-rpc-middleware/fetch')
const createBlockRefMiddleware = require('eth-json-rpc-middleware/block-ref') const createBlockRefRewriteMiddleware = require('eth-json-rpc-middleware/block-ref-rewrite')
const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache') const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache')
const createInflightMiddleware = require('eth-json-rpc-middleware/inflight-cache') const createInflightMiddleware = require('eth-json-rpc-middleware/inflight-cache')
const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector') const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector')
@ -15,7 +15,7 @@ function createJsonRpcClient ({ rpcUrl }) {
const blockTracker = new BlockTracker({ provider: blockProvider }) const blockTracker = new BlockTracker({ provider: blockProvider })
const networkMiddleware = mergeMiddleware([ const networkMiddleware = mergeMiddleware([
createBlockRefMiddleware({ blockTracker }), createBlockRefRewriteMiddleware({ blockTracker }),
createBlockCacheMiddleware({ blockTracker }), createBlockCacheMiddleware({ blockTracker }),
createInflightMiddleware(), createInflightMiddleware(),
createBlockTrackerInspectorMiddleware({ blockTracker }), createBlockTrackerInspectorMiddleware({ blockTracker }),

@ -1,6 +1,6 @@
const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware') const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware')
const createFetchMiddleware = require('eth-json-rpc-middleware/fetch') const createFetchMiddleware = require('eth-json-rpc-middleware/fetch')
const createBlockRefMiddleware = require('eth-json-rpc-middleware/block-ref') const createBlockRefRewriteMiddleware = require('eth-json-rpc-middleware/block-ref-rewrite')
const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector') const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector')
const providerFromMiddleware = require('eth-json-rpc-middleware/providerFromMiddleware') const providerFromMiddleware = require('eth-json-rpc-middleware/providerFromMiddleware')
const BlockTracker = require('eth-block-tracker') const BlockTracker = require('eth-block-tracker')
@ -13,7 +13,7 @@ function createLocalhostClient () {
const blockTracker = new BlockTracker({ provider: blockProvider, pollingInterval: 1000 }) const blockTracker = new BlockTracker({ provider: blockProvider, pollingInterval: 1000 })
const networkMiddleware = mergeMiddleware([ const networkMiddleware = mergeMiddleware([
createBlockRefMiddleware({ blockTracker }), createBlockRefRewriteMiddleware({ blockTracker }),
createBlockTrackerInspectorMiddleware({ blockTracker }), createBlockTrackerInspectorMiddleware({ blockTracker }),
fetchMiddleware, fetchMiddleware,
]) ])

6
package-lock.json generated

@ -9889,9 +9889,9 @@
} }
}, },
"eth-json-rpc-middleware": { "eth-json-rpc-middleware": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-3.0.0.tgz", "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-3.1.0.tgz",
"integrity": "sha512-t8ajxmUodXP7WAMXKrB8jCU05BE/iSXxLeiXCmC++FWAUXhnBV3+Li1ca0q4w+swmQYsSXZnViLw5w5+I/9IpA==", "integrity": "sha512-hIaLAvXZdlA9r1vZhEp3QFSGgS18+E+VAbqbtIDvW7dYwqjooxTd3s0DOQms+pnUJzMVp1qhpqjKC2VNux97Nw==",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "^2.5.0", "async": "^2.5.0",

@ -260,7 +260,7 @@
"eslint-plugin-json": "^1.2.0", "eslint-plugin-json": "^1.2.0",
"eslint-plugin-mocha": "^5.0.0", "eslint-plugin-mocha": "^5.0.0",
"eslint-plugin-react": "^7.4.0", "eslint-plugin-react": "^7.4.0",
"eth-json-rpc-middleware": "^3.0.0", "eth-json-rpc-middleware": "^3.1.0",
"eth-keyring-controller": "^3.3.1", "eth-keyring-controller": "^3.3.1",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"fs-extra": "^6.0.1", "fs-extra": "^6.0.1",

Loading…
Cancel
Save