From 2422c78ce20a032a81545bf8cc03394e12c599d5 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 3 Jun 2016 13:58:09 -0700 Subject: Add network loading indication --- app/scripts/lib/idStore.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/scripts/lib/idStore.js') diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 4ce4fd6f2..7f2659381 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -131,8 +131,10 @@ IdentityStore.prototype.revealAccount = function(cb) { } IdentityStore.prototype.getNetwork = function(tries) { + if (tries === 0) { this._currentState.network = 'error' + this._didUpdate() return } this.web3.version.getNetwork((err, network) => { @@ -140,7 +142,11 @@ IdentityStore.prototype.getNetwork = function(tries) { return this.getNetwork(tries - 1, cb) } this._currentState.network = network + this._didUpdate() }) + + this._currentState.network = 'loading' + this._didUpdate() } IdentityStore.prototype.setLocked = function(cb){ -- cgit