mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
parent
479da07897
commit
d87a7b2a76
@ -273,7 +273,7 @@ module.exports = class KeyringController extends EventEmitter {
|
|||||||
setSelectedAccount (address) {
|
setSelectedAccount (address) {
|
||||||
var addr = normalize(address)
|
var addr = normalize(address)
|
||||||
this.configManager.setSelectedAccount(addr)
|
this.configManager.setSelectedAccount(addr)
|
||||||
return Promise.resolve(addr)
|
return this.fullUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save Account Label
|
// Save Account Label
|
||||||
|
@ -263,9 +263,7 @@ function showInfoPage () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setSelectedAccount (address) {
|
function setSelectedAccount (address) {
|
||||||
return (dispatch) => {
|
return callBackgroundThenUpdate(background.setSelectedAccount, address)
|
||||||
background.setSelectedAccount(address)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentFiat (fiat) {
|
function setCurrentFiat (fiat) {
|
||||||
@ -457,15 +455,16 @@ function lockMetamask () {
|
|||||||
function showAccountDetail (address) {
|
function showAccountDetail (address) {
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
dispatch(actions.showLoadingIndication())
|
dispatch(actions.showLoadingIndication())
|
||||||
background.setSelectedAccount(address, (err, address) => {
|
background.setSelectedAccount(address, (err, newState) => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
dispatch(actions.hideLoadingIndication())
|
||||||
if (err) {
|
if (err) {
|
||||||
return dispatch(actions.displayWarning(err.message))
|
return dispatch(actions.displayWarning(err.message))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch(actions.updateMetamaskState(newState))
|
||||||
dispatch({
|
dispatch({
|
||||||
type: actions.SHOW_ACCOUNT_DETAIL,
|
type: actions.SHOW_ACCOUNT_DETAIL,
|
||||||
value: address,
|
value: newState.selectedAccount,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user