diff options
Diffstat (limited to 'app/scripts/controllers/network/network.js')
-rw-r--r-- | app/scripts/controllers/network/network.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/scripts/controllers/network/network.js b/app/scripts/controllers/network/network.js index 2958ba3b0..0c6327f6e 100644 --- a/app/scripts/controllers/network/network.js +++ b/app/scripts/controllers/network/network.js @@ -37,8 +37,9 @@ const defaultNetworkConfig = { module.exports = class NetworkController extends EventEmitter { - constructor (opts = {}) { + constructor (opts = {}, platform) { super() + this.platform = platform // parse options const providerConfig = opts.provider || defaultProviderConfig @@ -180,7 +181,7 @@ module.exports = class NetworkController extends EventEmitter { _configureInfuraProvider ({ type }) { log.info('NetworkController - configureInfuraProvider', type) - const networkClient = createInfuraClient({ network: type }) + const networkClient = createInfuraClient({ network: type, platform: this.platform }) this._setNetworkClient(networkClient) // setup networkConfig var settings = { @@ -191,13 +192,13 @@ module.exports = class NetworkController extends EventEmitter { _configureLocalhostProvider () { log.info('NetworkController - configureLocalhostProvider') - const networkClient = createLocalhostClient() + const networkClient = createLocalhostClient({ platform: this.platform }) this._setNetworkClient(networkClient) } _configureStandardProvider ({ rpcUrl, chainId, ticker, nickname }) { log.info('NetworkController - configureStandardProvider', rpcUrl) - const networkClient = createJsonRpcClient({ rpcUrl }) + const networkClient = createJsonRpcClient({ rpcUrl, platform: this.platform }) // hack to add a 'rpc' network with chainId networks.networkList['rpc'] = { chainId: chainId, |