aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/network.js
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-10-27 07:22:08 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-10-27 07:22:08 +0800
commit1e9c0a9db2d58e61361bff7430d3a74006ef131c (patch)
tree1d1f09bfe2e1985c42d5a117e8e63d19c71a360b /app/scripts/controllers/network.js
parenta387def701303e56f721fdc7c716e72641bfaf8f (diff)
parent19afb638194a11367250153a710d77011665132a (diff)
downloadtangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar.gz
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar.bz2
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar.lz
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar.xz
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.tar.zst
tangerine-wallet-browser-1e9c0a9db2d58e61361bff7430d3a74006ef131c.zip
Resolve merge conflicts
Diffstat (limited to 'app/scripts/controllers/network.js')
-rw-r--r--app/scripts/controllers/network.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js
index 0f9db4d53..23afdc12b 100644
--- a/app/scripts/controllers/network.js
+++ b/app/scripts/controllers/network.js
@@ -51,6 +51,10 @@ module.exports = class NetworkController extends EventEmitter {
}
lookupNetwork () {
+ // Prevent firing when provider is not defined.
+ if (!this.ethQuery || !this.ethQuery.sendAsync) {
+ return
+ }
this.ethQuery.sendAsync({ method: 'net_version' }, (err, network) => {
if (err) return this.setNetworkState('loading')
log.info('web3.getNetwork returned ' + network)
@@ -101,7 +105,7 @@ module.exports = class NetworkController extends EventEmitter {
this.emit('networkDidChange')
}
- _configureStandardProvider(_providerParams) {
+ _configureStandardProvider (_providerParams) {
const providerParams = extend(this._baseProviderParams, _providerParams)
const provider = createMetamaskProvider(providerParams)
this._setProvider(provider)