Support undefined address selection

If `setSelectedAddress` is called on the IdStore, the first account is automatically selected.
feature/default_network_editable
Dan Finlay 9 years ago
parent d8a17a25d3
commit b134bb4374
  1. 5
      app/scripts/lib/idStore.js

@ -98,6 +98,11 @@ IdentityStore.prototype.getSelectedAddress = function(){
} }
IdentityStore.prototype.setSelectedAddress = function(address){ IdentityStore.prototype.setSelectedAddress = function(address){
if (!address) {
var addresses = this._getAddresses()
address = addresses[0]
}
this._currentState.selectedAddress = address this._currentState.selectedAddress = address
this._didUpdate() this._didUpdate()
} }

Loading…
Cancel
Save