diff options
Streamlined some transition logic
Fixes #122
Had used multiple actions for some transitions, which would lead to brief intermediary states.
Now making a few actions much more explicit about what they route to, so there is less intermediary logic, and we can transition confidently to the correct view.
Diffstat (limited to 'ui/app/reducers/metamask.js')
-rw-r--r-- | ui/app/reducers/metamask.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 8bf5c8aae..8628e84d2 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -29,6 +29,7 @@ function reduceMetamask(state, action) { return extend(metamaskState, { isUnlocked: true, isInitialized: true, + selectedAccount: action.value, }) case actions.LOCK_METAMASK: @@ -85,9 +86,14 @@ function reduceMetamask(state, action) { return newState case actions.SHOW_ACCOUNT_DETAIL: - return extend(metamaskState, { + const newState = extend(metamaskState, { + isUnlocked: true, + isInitialized: true, selectedAccount: action.value, + selectedAddress: action.value, }) + delete newState.seedWords + return newState default: return metamaskState |