aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/idStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r--app/scripts/lib/idStore.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 7f2659381..85e8c8301 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -130,23 +130,23 @@ IdentityStore.prototype.revealAccount = function(cb) {
cb(null)
}
-IdentityStore.prototype.getNetwork = function(tries) {
+IdentityStore.prototype.getNetwork = function(err) {
- if (tries === 0) {
- this._currentState.network = 'error'
+ if (err) {
+ this._currentState.network = 'loading'
this._didUpdate()
- return
}
+
this.web3.version.getNetwork((err, network) => {
if (err) {
- return this.getNetwork(tries - 1, cb)
+ this._currentState.network = 'loading'
+ return this._didUpdate()
}
+
+ console.log('web3.getNetwork returned ' + network)
this._currentState.network = network
this._didUpdate()
})
-
- this._currentState.network = 'loading'
- this._didUpdate()
}
IdentityStore.prototype.setLocked = function(cb){