1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

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

This commit is contained in:
kumavis 2018-10-08 12:39:18 -04:00
parent 354f8c0d7d
commit fe82c4a9fb
4 changed files with 8 additions and 8 deletions

View File

@ -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 }),

View File

@ -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
View File

@ -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",

View File

@ -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",