diff options
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/app.js | 35 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 9 |
2 files changed, 27 insertions, 17 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 5c5c0acce..719d8c8b9 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -29,13 +29,10 @@ function reduceApp (state, action) { name: 'createVaultComplete', seedWords, } - var ethStoreWarning = { - name: 'EthStoreWarning', - } var appState = extend({ menuOpen: false, - currentView: seedWords ? seedConfView : !state.metamask.isEthConfirmed ? ethStoreWarning : defaultView, + currentView: seedWords ? seedConfView : defaultView, accountDetail: { subview: 'transactions', }, @@ -46,7 +43,19 @@ function reduceApp (state, action) { switch (action.type) { - // intialize + // transition methods + + case actions.TRANSITION_FORWARD: + return extend(appState, { + transForward: true, + }) + + case actions.TRANSITION_BACKWARD: + return extend(appState, { + transForward: false, + }) + + // intialize case actions.SHOW_CREATE_VAULT: return extend(appState, { @@ -119,6 +128,15 @@ function reduceApp (state, action) { warning: null, }) + case actions.SHOW_NEW_KEYCHAIN: + return extend(appState, { + currentView: { + name: 'newKeychain', + context: appState.currentView.context, + }, + transForward: true, + }) + // unlock case actions.UNLOCK_METAMASK: @@ -227,6 +245,7 @@ function reduceApp (state, action) { isLoading: false, warning: null, scrollToBottom: false, + forgottenPassword: false, }) case actions.SHOW_NOTICE: @@ -278,7 +297,6 @@ function reduceApp (state, action) { warning: null, }) } else { - notification.closePopup() return extend(appState, { @@ -286,7 +304,7 @@ function reduceApp (state, action) { warning: null, currentView: { name: 'accountDetail', - context: state.metamask.selectedAddress, + context: state.metamask.selectedAccount, }, accountDetail: { subview: 'transactions', @@ -335,7 +353,7 @@ function reduceApp (state, action) { case actions.UNLOCK_FAILED: return extend(appState, { - warning: 'Incorrect password. Try again.', + warning: action.value || 'Incorrect password. Try again.', }) case actions.SHOW_LOADING: @@ -546,4 +564,3 @@ function indexForPending (state, txId) { }) return idx } - diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 9a1c5814d..8679ab062 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -10,7 +10,6 @@ function reduceMetamask (state, action) { var metamaskState = extend({ isInitialized: false, isUnlocked: false, - isEthConfirmed: false, rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, unconfTxs: {}, @@ -44,12 +43,7 @@ function reduceMetamask (state, action) { case actions.AGREE_TO_DISCLAIMER: return extend(metamaskState, { - isConfirmed: true, - }) - - case actions.AGREE_TO_ETH_WARNING: - return extend(metamaskState, { - isEthConfirmed: !metamaskState.isEthConfirmed, + isDisclaimerConfirmed: true, }) case actions.UNLOCK_METAMASK: @@ -117,7 +111,6 @@ function reduceMetamask (state, action) { isUnlocked: true, isInitialized: true, selectedAccount: action.value, - selectedAddress: action.value, }) delete newState.seedWords return newState |