aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-10-23 13:24:50 +0800
committerDan Finlay <dan@danfinlay.com>2017-10-23 13:24:50 +0800
commit6d052384691b6336df0a60b47f3283ee2bb06ada (patch)
treeaf60d680a8b18bb21cf2e87086e9d76930a1ae49 /app
parent926abc12b13c1529af188d156cc45f14d7e80bc5 (diff)
downloadtangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar.gz
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar.bz2
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar.lz
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar.xz
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.tar.zst
tangerine-wallet-browser-6d052384691b6336df0a60b47f3283ee2bb06ada.zip
Try to fix intermittent test failure in NonceTracker tests
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/network.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/controllers/network.js b/app/scripts/controllers/network.js
index 0f9db4d53..7f0cbd379 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)