diff options
author | kumavis <kumavis@users.noreply.github.com> | 2019-05-04 01:32:05 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2019-05-04 01:32:05 +0800 |
commit | 2845398c3d824e5da1830ba7905ffdbf8149cf9e (patch) | |
tree | a95ca83b7cf8ac42cef5ad08d29e8240f8bf1e30 /app/scripts/controllers/network/createInfuraClient.js | |
parent | 2ff522604b2a5f45697087613de5efb9bba58790 (diff) | |
download | tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.gz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.bz2 tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.lz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.xz tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.tar.zst tangerine-wallet-browser-2845398c3d824e5da1830ba7905ffdbf8149cf9e.zip |
Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410)
* Ensure home screen does not render if there are unapproved txs (#6501)
* Ensure that the confirm screen renders before the home screen if there are unapproved txs.
* Only render confirm screen before home screen on mount.
* inpage - revert _metamask api to isEnabled isApproved isUnlocked
Diffstat (limited to 'app/scripts/controllers/network/createInfuraClient.js')
-rw-r--r-- | app/scripts/controllers/network/createInfuraClient.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/controllers/network/createInfuraClient.js b/app/scripts/controllers/network/createInfuraClient.js index 70b332867..0a6e9ecb0 100644 --- a/app/scripts/controllers/network/createInfuraClient.js +++ b/app/scripts/controllers/network/createInfuraClient.js @@ -7,14 +7,14 @@ 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 createInfuraMiddleware = require('eth-json-rpc-infura') -const createBlockTracker = require('./createBlockTracker') +const BlockTracker = require('eth-block-tracker') module.exports = createInfuraClient -function createInfuraClient ({ network, platform }) { +function createInfuraClient ({ network }) { const infuraMiddleware = createInfuraMiddleware({ network, maxAttempts: 5, source: 'metamask' }) const infuraProvider = providerFromMiddleware(infuraMiddleware) - const blockTracker = createBlockTracker({ provider: infuraProvider }, platform) + const blockTracker = new BlockTracker({ provider: infuraProvider }) const networkMiddleware = mergeMiddleware([ createNetworkAndChainIdMiddleware({ network }), |