diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-08-11 04:48:34 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-08-11 04:48:34 +0800 |
commit | ba1edc429b948962fe0f03ef43588f7945cea3f2 (patch) | |
tree | eda1b54a424c2fc06ef151763b5cb57d2e838116 /ui/app/reducers | |
parent | 9c6dd9ef4953f6e421feb6e6684ef43da26f6b75 (diff) | |
parent | c48b60d7a6f14d2d2348be8d9a63965ca1267433 (diff) | |
download | tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.gz tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.bz2 tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.lz tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.xz tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.zst tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.zip |
Merge branch 'master' into buyForm
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/app.js | 18 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 6 |
2 files changed, 23 insertions, 1 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 06afd0ae1..a9d6e4ff0 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -28,10 +28,13 @@ function reduceApp (state, action) { name: 'createVaultComplete', seedWords, } + var ethStoreWarning = { + name: 'EthStoreWarning', + } var appState = extend({ menuOpen: false, - currentView: seedWords ? seedConfView : defaultView, + currentView: seedWords ? seedConfView : !state.metamask.isEthConfirmed ? ethStoreWarning : defaultView, accountDetail: { subview: 'transactions', }, @@ -366,6 +369,17 @@ function reduceApp (state, action) { }, }) + case actions.SHOW_ETH_WARNING: + return extend(appState, { + transForward: true, + currentView: { + name: 'accountDetail', + context: appState.currentView.context, + }, + accountDetail: { + subview: 'buy-eth-warning', + }, + }) default: return appState } @@ -390,3 +404,5 @@ function indexForPending (state, txId) { }) return idx } + + diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index f3ef8eb11..4eef20f56 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -10,6 +10,7 @@ function reduceMetamask (state, action) { var metamaskState = extend({ isInitialized: false, isUnlocked: false, + isEthConfirmed: false, currentDomain: 'example.com', rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, @@ -31,6 +32,11 @@ function reduceMetamask (state, action) { isConfirmed: true, }) + case actions.AGREE_TO_ETH_WARNING: + return extend(metamaskState, { + isEthConfirmed: !metamaskState.isEthConfirmed, + }) + case actions.UNLOCK_METAMASK: return extend(metamaskState, { isUnlocked: true, |