Merge pull request #230 from MetaMask/i150

idStore - track network failure
This commit is contained in:
kumavis 2016-05-30 10:06:19 -10:00
commit 1d65160ab4
1 changed files with 4 additions and 1 deletions

View File

@ -131,7 +131,10 @@ IdentityStore.prototype.revealAccount = function(cb) {
}
IdentityStore.prototype.getNetwork = function(tries) {
if (tries === 0) return
if (tries === 0) {
this._currentState.network = 'error'
return
}
this.web3.version.getNetwork((err, network) => {
if (err) {
return this.getNetwork(tries - 1, cb)