aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-04 06:18:20 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-04 06:18:20 +0800
commitd49ef1a2e54b0a9ac7a3d23d7744990543246ec6 (patch)
tree38970967e820a5365c8fcde7e134c2fccf705301 /app/scripts/lib
parent2422c78ce20a032a81545bf8cc03394e12c599d5 (diff)
downloadtangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar.gz
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar.bz2
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar.lz
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar.xz
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.tar.zst
tangerine-wallet-browser-d49ef1a2e54b0a9ac7a3d23d7744990543246ec6.zip
Blockchain status now updates on availability change
Diffstat (limited to 'app/scripts/lib')
-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){