diff options
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.js | 10 |
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 } } |