mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Support undefined address selection
If `setSelectedAddress` is called on the IdStore, the first account is automatically selected.
This commit is contained in:
parent
d8a17a25d3
commit
b134bb4374
@ -98,6 +98,11 @@ IdentityStore.prototype.getSelectedAddress = function(){
|
||||
}
|
||||
|
||||
IdentityStore.prototype.setSelectedAddress = function(address){
|
||||
if (!address) {
|
||||
var addresses = this._getAddresses()
|
||||
address = addresses[0]
|
||||
}
|
||||
|
||||
this._currentState.selectedAddress = address
|
||||
this._didUpdate()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user