diff options
author | Paul Bouchon <mail@bitpshr.net> | 2019-02-20 08:42:08 +0800 |
---|---|---|
committer | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2019-02-20 08:42:08 +0800 |
commit | 2f7d4494278ad809c1cc9fcc0d9438182003b22d (patch) | |
tree | cf3a9a60c84ee8dd53bbb0fdc115f1285da40d01 /app/scripts/controllers/network/createJsonRpcClient.js | |
parent | 1eebe54c6422845ec90e6bdb8bffc7c1a7da440c (diff) | |
download | tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar.gz tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar.bz2 tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar.lz tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar.xz tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.tar.zst tangerine-wallet-browser-2f7d4494278ad809c1cc9fcc0d9438182003b22d.zip |
EIP-1193: standard provider API (#6170)
* EIP-1193: Implement new provider API
* EIP-1193: Updated implementation
* Remove test file
* Fix tests
* Update ping check
* Update logic
* PR feedback
Diffstat (limited to 'app/scripts/controllers/network/createJsonRpcClient.js')
-rw-r--r-- | app/scripts/controllers/network/createJsonRpcClient.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/controllers/network/createJsonRpcClient.js b/app/scripts/controllers/network/createJsonRpcClient.js index a8cbf2aaf..369dcd299 100644 --- a/app/scripts/controllers/network/createJsonRpcClient.js +++ b/app/scripts/controllers/network/createJsonRpcClient.js @@ -5,14 +5,14 @@ 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') const providerFromMiddleware = require('eth-json-rpc-middleware/providerFromMiddleware') -const BlockTracker = require('eth-block-tracker') +const createBlockTracker = require('./createBlockTracker') module.exports = createJsonRpcClient -function createJsonRpcClient ({ rpcUrl }) { +function createJsonRpcClient ({ rpcUrl, platform }) { const fetchMiddleware = createFetchMiddleware({ rpcUrl }) const blockProvider = providerFromMiddleware(fetchMiddleware) - const blockTracker = new BlockTracker({ provider: blockProvider }) + const blockTracker = createBlockTracker({ provider: blockProvider }, platform) const networkMiddleware = mergeMiddleware([ createBlockRefRewriteMiddleware({ blockTracker }), |