aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-31 03:13:45 +0800
committerDan <danjm.com@gmail.com>2018-05-31 03:30:50 +0800
commit1c3d2aa18b85ddb83734d6afdbb1111ba0791229 (patch)
tree30898c8b69393476196bcf194a31d99994bc8190 /ui/app/actions.js
parent389346913bf076fde6190a61afc4e3e4cd210afc (diff)
downloadtangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar.gz
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar.bz2
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar.lz
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar.xz
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.tar.zst
tangerine-wallet-browser-1c3d2aa18b85ddb83734d6afdbb1111ba0791229.zip
Importing account by json and private key shows error and does not change account if no selectedAddress comes after import.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 649f740e9..ed3c147b8 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -544,10 +544,12 @@ function importNewAccount (strategy, args) {
}
dispatch(actions.hideLoadingIndication())
dispatch(actions.updateMetamaskState(newState))
- dispatch({
- type: actions.SHOW_ACCOUNT_DETAIL,
- value: newState.selectedAddress,
- })
+ if (newState.selectedAddress) {
+ dispatch({
+ type: actions.SHOW_ACCOUNT_DETAIL,
+ value: newState.selectedAddress,
+ })
+ }
return newState
}
}