aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2016-07-22 04:41:10 +0800
committerDan Finlay <somniac@me.com>2016-07-22 04:41:10 +0800
commitfcd523abe4c5e8c4da7f176b2fc15578903384b7 (patch)
tree9118133325c282d01f49bc717dacabfd824aa762 /ui/app/reducers
parent6658bea8d444281491718f8eee7bc3ae42f91b69 (diff)
downloadtangerine-wallet-browser-fcd523abe4c5e8c4da7f176b2fc15578903384b7.tar.gz
tangerine-wallet-browser-fcd523abe4c5e8c4da7f176b2fc15578903384b7.tar.zst
tangerine-wallet-browser-fcd523abe4c5e8c4da7f176b2fc15578903384b7.zip
Buy button (#474)
* WIP: Buy button link * Add buy eth and the buy eth warning message * Add css * Move the opening of coinbase page to background and send to faucet if on test net * Create a Warning about storeing eth * Finish Buy button and Eth store warning screen * Add to CHANGELOG * fix frankies deletion and change chrome to extension
Diffstat (limited to 'ui/app/reducers')
-rw-r--r--ui/app/reducers/app.js18
-rw-r--r--ui/app/reducers/metamask.js5
2 files changed, 22 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..8d4520fb1 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -31,6 +31,11 @@ function reduceMetamask (state, action) {
isConfirmed: true,
})
+ case actions.AGREE_TO_ETH_WARNING:
+ return extend(metamaskState, {
+ isEthConfirmed: true,
+ })
+
case actions.UNLOCK_METAMASK:
return extend(metamaskState, {
isUnlocked: true,