aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-10-08 23:55:07 +0800
committerkumavis <aaron@kumavis.me>2018-10-08 23:55:07 +0800
commit354f8c0d7de8ff2611988f9839c2072295c955ae (patch)
treeda69526eebd007857b6efedb5c0a3dc165318ad0
parentc500ef4a587c4d3eebbc1e392227aabbbf4f2b2e (diff)
downloadtangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar.gz
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar.bz2
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar.lz
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar.xz
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.tar.zst
tangerine-wallet-browser-354f8c0d7de8ff2611988f9839c2072295c955ae.zip
provider - enable subscription support (newHeads, logs)
-rw-r--r--app/scripts/controllers/network/createInfuraClient.js10
-rw-r--r--app/scripts/metamask-controller.js20
-rw-r--r--package-lock.json355
-rw-r--r--package.json10
4 files changed, 303 insertions, 92 deletions
diff --git a/app/scripts/controllers/network/createInfuraClient.js b/app/scripts/controllers/network/createInfuraClient.js
index 41af4d9f9..326bcb355 100644
--- a/app/scripts/controllers/network/createInfuraClient.js
+++ b/app/scripts/controllers/network/createInfuraClient.js
@@ -1,5 +1,6 @@
const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware')
-const createBlockReEmitMiddleware = require('eth-json-rpc-middleware/block-reemit')
+const createBlockReRefMiddleware = require('eth-json-rpc-middleware/block-ref')
+const createRetryOnEmptyMiddleware = require('eth-json-rpc-middleware/retryOnEmpty')
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')
@@ -11,13 +12,14 @@ module.exports = createInfuraClient
function createInfuraClient ({ network }) {
const infuraMiddleware = createInfuraMiddleware({ network })
- const blockProvider = providerFromMiddleware(infuraMiddleware)
- const blockTracker = new BlockTracker({ provider: blockProvider })
+ const infuraProvider = providerFromMiddleware(infuraMiddleware)
+ const blockTracker = new BlockTracker({ provider: infuraProvider })
const networkMiddleware = mergeMiddleware([
createBlockCacheMiddleware({ blockTracker }),
createInflightMiddleware(),
- createBlockReEmitMiddleware({ blockTracker, provider: blockProvider }),
+ createBlockReRefMiddleware({ blockTracker, provider: infuraProvider }),
+ createRetryOnEmptyMiddleware({ blockTracker, provider: infuraProvider }),
createBlockTrackerInspectorMiddleware({ blockTracker }),
infuraMiddleware,
])
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 34ca80dd7..a59be7744 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -15,6 +15,7 @@ const RpcEngine = require('json-rpc-engine')
const debounce = require('debounce')
const createEngineStream = require('json-rpc-middleware-stream/engineStream')
const createFilterMiddleware = require('eth-json-rpc-filters')
+const createSubscriptionManager = require('eth-json-rpc-filters/subscriptionManager')
const createOriginMiddleware = require('./lib/createOriginMiddleware')
const createLoggerMiddleware = require('./lib/createLoggerMiddleware')
const createProviderMiddleware = require('./lib/createProviderMiddleware')
@@ -1246,24 +1247,33 @@ module.exports = class MetamaskController extends EventEmitter {
setupProviderConnection (outStream, origin) {
// setup json rpc engine stack
const engine = new RpcEngine()
+ const provider = this.provider
+ const blockTracker = this.blockTracker
// create filter polyfill middleware
- const filterMiddleware = createFilterMiddleware({
- provider: this.provider,
- blockTracker: this.blockTracker,
- })
+ const filterMiddleware = createFilterMiddleware({ provider, blockTracker })
+ // create subscription polyfill middleware
+ const subscriptionManager = createSubscriptionManager({ provider, blockTracker })
+ subscriptionManager.events.on('notification', (message) => engine.emit('notification', message))
+ // metadata
engine.push(createOriginMiddleware({ origin }))
engine.push(createLoggerMiddleware({ origin }))
+ // filter and subscription polyfills
engine.push(filterMiddleware)
+ engine.push(subscriptionManager.middleware)
+ // watch asset
engine.push(this.preferencesController.requestWatchAsset.bind(this.preferencesController))
+ // sign typed data middleware
engine.push(this.createTypedDataMiddleware('eth_signTypedData', 'V1').bind(this))
engine.push(this.createTypedDataMiddleware('eth_signTypedData_v1', 'V1').bind(this))
engine.push(this.createTypedDataMiddleware('eth_signTypedData_v3', 'V3', true).bind(this))
- engine.push(createProviderMiddleware({ provider: this.provider }))
+ // forward to metamask primary provider
+ engine.push(createProviderMiddleware({ provider }))
// setup connection
const providerStream = createEngineStream({ engine })
+
pump(
outStream,
providerStream,
diff --git a/package-lock.json b/package-lock.json
index c9959b658..0f0b109a2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5469,8 +5469,7 @@
"btoa": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
- "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
- "dev": true
+ "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
},
"buffer": {
"version": "5.1.0",
@@ -9605,7 +9604,7 @@
},
"eth-json-rpc-middleware": {
"version": "1.6.0",
- "resolved": "http://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz",
+ "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz",
"integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==",
"requires": {
"async": "^2.5.0",
@@ -9644,12 +9643,12 @@
},
"node-fetch": {
"version": "2.1.2",
- "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz",
"integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U="
},
"whatwg-fetch": {
"version": "2.0.4",
- "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
}
}
@@ -9731,46 +9730,60 @@
}
},
"eth-json-rpc-filters": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-2.1.1.tgz",
- "integrity": "sha512-FSFcCMJ1lRS8az1LhIK5Klima8Hyfv4keKSdW2MA3zwiN/wX1NKb/sQSEFO3nstPUqR2Aa02lVokp85UnnrBlA==",
- "requires": {
- "await-semaphore": "^0.1.1",
- "eth-json-rpc-middleware": "^1.6.0",
- "ethjs-query": "^0.3.6",
- "json-rpc-engine": "^3.4.0",
- "lodash.flatmap": "^4.5.0"
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-3.0.1.tgz",
+ "integrity": "sha512-F/UbtD47UnZDFILYP5GJLklYQ7witEI9TdCLgw0r4iag8ZLzz5h4Q+9odg2ASVZKkm8E50mrb7PaYCK0thVxfw==",
+ "requires": {
+ "await-semaphore": "^0.1.3",
+ "eth-json-rpc-middleware": "^2.6.0",
+ "ethjs-query": "^0.3.8",
+ "json-rpc-engine": "^3.8.0",
+ "lodash.flatmap": "^4.5.0",
+ "safe-event-emitter": "^1.0.1"
},
"dependencies": {
- "babelify": {
- "version": "7.3.0",
- "resolved": "http://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz",
- "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=",
- "requires": {
- "babel-core": "^6.0.14",
- "object-assign": "^4.0.0"
- }
- },
"eth-json-rpc-middleware": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz",
- "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-2.6.0.tgz",
+ "integrity": "sha512-IziwA0IXzxCVgruvb0KzhypAdRNM6QBC6LOlXQrzr8ddo3in+PGzl9tMV79TGFoRoRfsysnjbvOKwMnQJADkIw==",
"requires": {
"async": "^2.5.0",
+ "btoa": "^1.2.1",
+ "clone": "^2.1.1",
"eth-query": "^2.1.2",
+ "eth-sig-util": "^1.4.2",
"eth-tx-summary": "^3.1.2",
"ethereumjs-block": "^1.6.0",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.2",
"ethereumjs-vm": "^2.1.0",
"fetch-ponyfill": "^4.0.0",
- "json-rpc-engine": "^3.6.0",
+ "json-rpc-engine": "^3.6.3",
"json-rpc-error": "^2.0.0",
"json-stable-stringify": "^1.0.1",
+ "pify": "^3.0.0",
"promise-to-callback": "^1.0.0",
+ "safe-event-emitter": "^1.0.1",
"tape": "^4.6.3"
}
},
+ "eth-sig-util": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
+ "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
+ "requires": {
+ "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7",
+ "ethereumjs-util": "^5.1.1"
+ }
+ },
+ "ethereumjs-abi": {
+ "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7",
+ "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
+ "requires": {
+ "bn.js": "^4.10.0",
+ "ethereumjs-util": "^5.0.0"
+ }
+ },
"ethereumjs-util": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
@@ -9803,19 +9816,6 @@
"requires": {
"promise-to-callback": "^1.0.0"
}
- },
- "json-rpc-engine": {
- "version": "3.7.3",
- "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz",
- "integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==",
- "requires": {
- "async": "^2.0.1",
- "babel-preset-env": "^1.3.2",
- "babelify": "^7.3.0",
- "clone": "^2.1.1",
- "json-rpc-error": "^2.0.0",
- "promise-to-callback": "^1.0.0"
- }
}
}
},
@@ -9889,9 +9889,9 @@
}
},
"eth-json-rpc-middleware": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-2.5.0.tgz",
- "integrity": "sha512-SVBP7U23JMd8HBp6uxh4BPbvrbtOsRI+otMCLCTtvH95MlvzuRDJZl5BQNIXZi7CNTEXjQZVcGAKLizlnc7zMQ==",
+ "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==",
"dev": true,
"requires": {
"async": "^2.5.0",
@@ -9910,6 +9910,7 @@
"json-stable-stringify": "^1.0.1",
"pify": "^3.0.0",
"promise-to-callback": "^1.0.0",
+ "safe-event-emitter": "^1.0.1",
"tape": "^4.6.3"
},
"dependencies": {
@@ -18024,15 +18025,16 @@
"dev": true
},
"json-rpc-engine": {
- "version": "3.7.4",
- "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.4.tgz",
- "integrity": "sha512-urQunMR6LYIPhGs6ppLGqdwSVkllaVa70Em9uGYgEi5iqG3/oKYZM0B9C9EaRfih30k+tztDn2GG9eHbuaMmwg==",
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz",
+ "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==",
"requires": {
"async": "^2.0.1",
- "babel-preset-env": "^1.3.2",
+ "babel-preset-env": "^1.7.0",
"babelify": "^7.3.0",
"json-rpc-error": "^2.0.0",
- "promise-to-callback": "^1.0.0"
+ "promise-to-callback": "^1.0.0",
+ "safe-event-emitter": "^1.0.1"
},
"dependencies": {
"babelify": {
@@ -18055,15 +18057,16 @@
}
},
"json-rpc-middleware-stream": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-1.0.1.tgz",
- "integrity": "sha512-IR6cOO6B21NdLpiYblueB3O+g3UAYLIZd6ZgZfddVPl0z6vSECcpuiYnV5MmIMJY3D0fLYpJqOxYaEmLYQqTtA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-2.1.0.tgz",
+ "integrity": "sha512-JxX+kbS9sDMHvnADFLlV/QtkgeIYVF/2R8UuxXaiZc7ntVEgi/lkzMGbGkDwdRg36rHnUIvCZk6zR/5Y3bAq1w==",
"requires": {
"end-of-stream": "^1.4.0",
"eth-block-tracker": "^2.1.2",
"ethjs-query": "^0.2.9",
- "json-rpc-engine": "^3.0.1",
- "readable-stream": "^2.3.3"
+ "json-rpc-engine": "^3.8.0",
+ "readable-stream": "^2.3.3",
+ "safe-event-emitter": "^1.0.1"
},
"dependencies": {
"async-eventemitter": {
@@ -18082,11 +18085,6 @@
"object-assign": "^4.0.0"
}
},
- "bn.js": {
- "version": "4.11.6",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
- "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
- },
"eth-block-tracker": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
@@ -18127,6 +18125,22 @@
"is-hex-prefixed": "1.0.0",
"number-to-bn": "1.7.0",
"strip-hex-prefix": "1.0.0"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "4.11.6",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
+ "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
+ },
+ "ethjs-util": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
+ "integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
+ "requires": {
+ "is-hex-prefixed": "1.0.0",
+ "strip-hex-prefix": "1.0.0"
+ }
+ }
}
},
"ethjs-query": {
@@ -18143,26 +18157,17 @@
"resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
"integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
},
- "ethjs-util": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
- "integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
- "requires": {
- "is-hex-prefixed": "1.0.0",
- "strip-hex-prefix": "1.0.0"
- }
- },
"json-rpc-engine": {
- "version": "3.7.3",
- "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz",
- "integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==",
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz",
+ "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==",
"requires": {
"async": "^2.0.1",
- "babel-preset-env": "^1.3.2",
+ "babel-preset-env": "^1.7.0",
"babelify": "^7.3.0",
- "clone": "^2.1.1",
"json-rpc-error": "^2.0.0",
- "promise-to-callback": "^1.0.0"
+ "promise-to-callback": "^1.0.0",
+ "safe-event-emitter": "^1.0.1"
}
},
"pify": {
@@ -20828,6 +20833,13 @@
"pump": "^1.0.2"
},
"dependencies": {
+ "async-eventemitter": {
+ "version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "from": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "requires": {
+ "async": "^2.4.0"
+ }
+ },
"babelify": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz",
@@ -20837,6 +20849,78 @@
"object-assign": "^4.0.0"
}
},
+ "eth-block-tracker": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
+ "integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==",
+ "requires": {
+ "async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "eth-query": "^2.1.0",
+ "ethereumjs-tx": "^1.3.3",
+ "ethereumjs-util": "^5.1.3",
+ "ethjs-util": "^0.1.3",
+ "json-rpc-engine": "^3.6.0",
+ "pify": "^2.3.0",
+ "tape": "^4.6.3"
+ }
+ },
+ "ethereumjs-util": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
+ "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
+ "requires": {
+ "bn.js": "^4.11.0",
+ "create-hash": "^1.1.2",
+ "ethjs-util": "^0.1.3",
+ "keccak": "^1.0.2",
+ "rlp": "^2.0.0",
+ "safe-buffer": "^5.1.1",
+ "secp256k1": "^3.0.1"
+ }
+ },
+ "ethjs-format": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.2.tgz",
+ "integrity": "sha1-1zs6YFwuElcHn3B3/VRI6ZjOD80=",
+ "requires": {
+ "bn.js": "4.11.6",
+ "ethjs-schema": "0.1.5",
+ "ethjs-util": "0.1.3",
+ "is-hex-prefixed": "1.0.0",
+ "number-to-bn": "1.7.0",
+ "strip-hex-prefix": "1.0.0"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "4.11.6",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
+ "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
+ },
+ "ethjs-util": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
+ "integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
+ "requires": {
+ "is-hex-prefixed": "1.0.0",
+ "strip-hex-prefix": "1.0.0"
+ }
+ }
+ }
+ },
+ "ethjs-query": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.2.9.tgz",
+ "integrity": "sha1-om5rTzhpnpLzSyGE51x4lDKcQvE=",
+ "requires": {
+ "ethjs-format": "0.2.2",
+ "ethjs-rpc": "0.1.5"
+ }
+ },
+ "ethjs-schema": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
+ "integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
+ },
"json-rpc-engine": {
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz",
@@ -20850,6 +20934,18 @@
"promise-to-callback": "^1.0.0"
}
},
+ "json-rpc-middleware-stream": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-1.0.1.tgz",
+ "integrity": "sha512-IR6cOO6B21NdLpiYblueB3O+g3UAYLIZd6ZgZfddVPl0z6vSECcpuiYnV5MmIMJY3D0fLYpJqOxYaEmLYQqTtA==",
+ "requires": {
+ "end-of-stream": "^1.4.0",
+ "eth-block-tracker": "^2.1.2",
+ "ethjs-query": "^0.2.9",
+ "json-rpc-engine": "^3.0.1",
+ "readable-stream": "^2.3.3"
+ }
+ },
"obs-store": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/obs-store/-/obs-store-2.4.1.tgz",
@@ -20862,6 +20958,11 @@
"xtend": "^4.0.1"
}
},
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ },
"pump": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
@@ -20874,22 +20975,120 @@
}
},
"metamask-inpage-provider": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/metamask-inpage-provider/-/metamask-inpage-provider-1.1.1.tgz",
- "integrity": "sha512-I7P8mny3e03dwzt0SFsXOmoj1eEz5GpUGiBIAJ4fyXUpx92JkII5ekq/MNkf5muktoJod9cWjDF03//+/DCD2A==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/metamask-inpage-provider/-/metamask-inpage-provider-1.2.0.tgz",
+ "integrity": "sha512-NH27h4ckuKvgraTz+MGwvQXFu4zkAxSAUc74rIzt+4Q94km9gePDZOM81xiA0AA0IExzv3844PWSWaYI1fagog==",
"requires": {
"json-rpc-engine": "^3.7.4",
- "json-rpc-middleware-stream": "^1.0.1",
+ "json-rpc-middleware-stream": "^2.0.0",
"loglevel": "^1.6.1",
"obj-multiplex": "^1.0.0",
"obs-store": "^3.0.0",
- "pump": "^3.0.0"
+ "pump": "^3.0.0",
+ "safe-event-emitter": "^1.0.1"
},
"dependencies": {
+ "async-eventemitter": {
+ "version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "from": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "requires": {
+ "async": "^2.4.0"
+ }
+ },
+ "eth-block-tracker": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
+ "integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==",
+ "requires": {
+ "async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
+ "eth-query": "^2.1.0",
+ "ethereumjs-tx": "^1.3.3",
+ "ethereumjs-util": "^5.1.3",
+ "ethjs-util": "^0.1.3",
+ "json-rpc-engine": "^3.6.0",
+ "pify": "^2.3.0",
+ "tape": "^4.6.3"
+ }
+ },
+ "ethereumjs-util": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
+ "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
+ "requires": {
+ "bn.js": "^4.11.0",
+ "create-hash": "^1.1.2",
+ "ethjs-util": "^0.1.3",
+ "keccak": "^1.0.2",
+ "rlp": "^2.0.0",
+ "safe-buffer": "^5.1.1",
+ "secp256k1": "^3.0.1"
+ }
+ },
+ "ethjs-format": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.2.tgz",
+ "integrity": "sha1-1zs6YFwuElcHn3B3/VRI6ZjOD80=",
+ "requires": {
+ "bn.js": "4.11.6",
+ "ethjs-schema": "0.1.5",
+ "ethjs-util": "0.1.3",
+ "is-hex-prefixed": "1.0.0",
+ "number-to-bn": "1.7.0",
+ "strip-hex-prefix": "1.0.0"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "4.11.6",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
+ "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
+ },
+ "ethjs-util": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
+ "integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
+ "requires": {
+ "is-hex-prefixed": "1.0.0",
+ "strip-hex-prefix": "1.0.0"
+ }
+ }
+ }
+ },
+ "ethjs-query": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.2.9.tgz",
+ "integrity": "sha1-om5rTzhpnpLzSyGE51x4lDKcQvE=",
+ "requires": {
+ "ethjs-format": "0.2.2",
+ "ethjs-rpc": "0.1.5"
+ }
+ },
+ "ethjs-schema": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
+ "integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
+ },
+ "json-rpc-middleware-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-2.0.0.tgz",
+ "integrity": "sha512-cDM0UQrNK6LTs5GgGb7xMfL6UGhKHHVjZRkKAUYyRsb0vjGUAC4AmkAc1Wngg0PQf/IyCsrrFi6WAxsNv5hTKQ==",
+ "requires": {
+ "end-of-stream": "^1.4.0",
+ "eth-block-tracker": "^2.1.2",
+ "ethjs-query": "^0.2.9",
+ "json-rpc-engine": "^3.0.1",
+ "readable-stream": "^2.3.3",
+ "safe-event-emitter": "^1.0.1"
+ }
+ },
"loglevel": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
"integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po="
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
},
diff --git a/package.json b/package.json
index 80497ae84..1439d6878 100644
--- a/package.json
+++ b/package.json
@@ -115,7 +115,7 @@
"eth-contract-metadata": "github:MetaMask/eth-contract-metadata#master",
"eth-ens-namehash": "^2.0.8",
"eth-hd-keyring": "^1.2.2",
- "eth-json-rpc-filters": "^2.1.1",
+ "eth-json-rpc-filters": "^3.0.1",
"eth-json-rpc-infura": "^3.0.0",
"eth-keyring-controller": "^3.1.4",
"eth-ledger-bridge-keyring": "^0.1.0",
@@ -155,8 +155,8 @@
"iframe-stream": "^3.0.0",
"inject-css": "^0.1.1",
"jazzicon": "^1.2.0",
- "json-rpc-engine": "^3.7.4",
- "json-rpc-middleware-stream": "^1.0.1",
+ "json-rpc-engine": "^3.8.0",
+ "json-rpc-middleware-stream": "^2.1.0",
"jsonschema": "^1.2.4",
"lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2",
@@ -164,7 +164,7 @@
"lodash.uniqby": "^4.7.0",
"loglevel": "^1.4.1",
"metamascara": "^2.0.0",
- "metamask-inpage-provider": "^1.1.1",
+ "metamask-inpage-provider": "^1.2.0",
"metamask-logo": "^2.1.4",
"mkdirp": "^0.5.1",
"multihashes": "^0.4.12",
@@ -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": "^2.5.0",
+ "eth-json-rpc-middleware": "^3.0.0",
"eth-keyring-controller": "^3.3.1",
"file-loader": "^1.1.11",
"fs-extra": "^6.0.1",