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 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 createInflightMiddleware = require('eth-json-rpc-middleware/inflight-cache')
const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector')
@ -15,7 +15,7 @@ function createJsonRpcClient ({ rpcUrl }) {
const blockTracker = new BlockTracker({ provider: blockProvider })
const networkMiddleware = mergeMiddleware([
createBlockRefMiddleware({ blockTracker }),
createBlockRefRewriteMiddleware({ blockTracker }),
createBlockCacheMiddleware({ blockTracker }),
createInflightMiddleware(),
createBlockTrackerInspectorMiddleware({ blockTracker }),

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

6
package-lock.json generated

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

@ -260,7 +260,7 @@
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-mocha": "^5.0.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",
"file-loader": "^1.1.11",
"fs-extra": "^6.0.1",

Loading…
Cancel
Save