aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/idStore.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-13 16:13:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-13 16:24:05 +0800
commit041b5493dc43c9f8b69dc5a1dde4b319638618a7 (patch)
treed74812d939398896cc275bbf4080faa26aa35e95 /app/scripts/lib/idStore.js
parentf2676d12413e379f3876e8e36b73478c66ed6ad0 (diff)
downloadtangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar.gz
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar.bz2
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar.lz
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar.xz
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.tar.zst
tangerine-wallet-browser-041b5493dc43c9f8b69dc5a1dde4b319638618a7.zip
Streamlined some transition logic
Fixes #122 Had used multiple actions for some transitions, which would lead to brief intermediary states. Now making a few actions much more explicit about what they route to, so there is less intermediary logic, and we can transition confidently to the correct view.
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r--app/scripts/lib/idStore.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index b8d825d8b..6d3d0c0aa 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -105,14 +105,14 @@ IdentityStore.prototype.getSelectedAddress = function(){
return configManager.getSelectedAccount()
}
-IdentityStore.prototype.setSelectedAddress = function(address){
+IdentityStore.prototype.setSelectedAddress = function(address, cb){
if (!address) {
var addresses = this._getAddresses()
address = addresses[0]
}
configManager.setSelectedAccount(address)
- this._didUpdate()
+ if (cb) return cb(null, address)
}
IdentityStore.prototype.getNetwork = function(tries) {