diff options
get identities from getState() instead of passing from caller, only set new account label if label set.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index a6730db7f..0a2b4a636 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -349,9 +349,10 @@ function navigateToNewAccountScreen () { } } -function addNewAccount (oldIdentities) { +function addNewAccount () { log.debug(`background.addNewAccount`) - return (dispatch) => { + return (dispatch, getState) => { + const oldIdentities = getState().metamask.identities dispatch(actions.showLoadingIndication()) return new Promise((resolve, reject) => { background.addNewAccount((err, { identities: newIdentities}) => { |