aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-23 05:00:00 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-23 05:35:51 +0800
commit13f22ff6b087f3865f84a0672a9013ada88be61a (patch)
tree0381a643abb923c28a649f079a6e914aecf0dadf /ui/app/actions.js
parenta1d72a59fe5b03363820d6e1ac2c383ec15ccbcb (diff)
downloadtangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar.gz
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar.bz2
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar.lz
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar.xz
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.tar.zst
tangerine-wallet-browser-13f22ff6b087f3865f84a0672a9013ada88be61a.zip
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.js5
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}) => {