diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-10-26 04:24:03 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-10-26 04:24:03 +0800 |
commit | 678301a20e6112d79a052c13f921bb75c451c613 (patch) | |
tree | 735a7e4cd5dc92aa3f574144660231728d9c74f2 /ui | |
parent | 16e2f029d8b76e6f1e951d35307d955c2346cd8d (diff) | |
download | tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar.gz tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar.bz2 tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar.lz tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar.xz tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.tar.zst tangerine-wallet-browser-678301a20e6112d79a052c13f921bb75c451c613.zip |
Phase out extra warning screen.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/account-detail.js | 1 | ||||
-rw-r--r-- | ui/app/actions.js | 23 | ||||
-rw-r--r-- | ui/app/app.js | 5 | ||||
-rw-r--r-- | ui/app/eth-store-warning.js | 89 | ||||
-rw-r--r-- | ui/app/reducers/app.js | 5 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 6 |
6 files changed, 1 insertions, 128 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 01c7e8781..c41ba61fd 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -30,7 +30,6 @@ function mapStateToProps (state) { network: state.metamask.network, unconfTxs: valuesFor(state.metamask.unconfTxs), unconfMsgs: valuesFor(state.metamask.unconfMsgs), - isEthWarningConfirmed: state.metamask.isEthConfirmed, shapeShiftTxList: state.metamask.shapeShiftTxList, } } diff --git a/ui/app/actions.js b/ui/app/actions.js index 525ceca54..1f8ba7f04 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -61,10 +61,6 @@ var actions = { showPrivateKey: showPrivateKey, SAVE_ACCOUNT_LABEL: 'SAVE_ACCOUNT_LABEL', saveAccountLabel: saveAccountLabel, - AGREE_TO_ETH_WARNING: 'AGREE_TO_ETH_WARNING', - agreeToEthWarning: agreeToEthWarning, - SHOW_ETH_WARNING: 'SHOW_ETH_WARNING', - showEthWarning: showEthWarning, // tx conf screen COMPLETED_TX: 'COMPLETED_TX', TRANSACTION_ERROR: 'TRANSACTION_ERROR', @@ -596,25 +592,6 @@ function showSendPage () { } } -function agreeToEthWarning () { - return (dispatch) => { - background.agreeToEthWarning((err) => { - if (err) { - return dispatch(actions.showEthWarning(err.message)) - } - dispatch({ - type: actions.AGREE_TO_ETH_WARNING, - }) - }) - } -} - -function showEthWarning () { - return { - type: actions.SHOW_ETH_WARNING, - } -} - function buyEth (address, amount) { return (dispatch) => { background.buyEth(address, amount) diff --git a/ui/app/app.js b/ui/app/app.js index a1004b74b..061545d59 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -25,7 +25,6 @@ const MenuDroppo = require('menu-droppo') const DropMenuItem = require('./components/drop-menu-item') const NetworkIndicator = require('./components/network') const Tooltip = require('./components/tooltip') -const EthStoreWarning = require('./eth-store-warning') const BuyView = require('./components/buy-button-subview') const QrView = require('./components/qr-code') module.exports = connect(mapStateToProps)(App) @@ -38,7 +37,6 @@ function mapStateToProps (state) { // state from plugin isLoading: state.appState.isLoading, isConfirmed: state.metamask.isConfirmed, - isEthConfirmed: state.metamask.isEthConfirmed, isInitialized: state.metamask.isInitialized, isUnlocked: state.metamask.isUnlocked, currentView: state.appState.currentView, @@ -421,9 +419,6 @@ App.prototype.renderPrimary = function () { // show current view switch (props.currentView.name) { - case 'EthStoreWarning': - return h(EthStoreWarning, {key: 'ethWarning'}) - case 'accounts': return h(AccountsScreen, {key: 'accounts'}) diff --git a/ui/app/eth-store-warning.js b/ui/app/eth-store-warning.js deleted file mode 100644 index fe3c7ce5d..000000000 --- a/ui/app/eth-store-warning.js +++ /dev/null @@ -1,89 +0,0 @@ -const connect = require('react-redux').connect -const Component = require('react').Component -const h = require('react-hyperscript') -const inherits = require('util').inherits -const actions = require('./actions') - -module.exports = connect(mapStateToProps)(EthStoreWarning) - -inherits(EthStoreWarning, Component) -function EthStoreWarning () { - Component.call(this) -} - -function mapStateToProps (state) { - return { - selectedAccount: state.metamask.selectedAccount, - } -} - -EthStoreWarning.prototype.render = function () { - - return ( - - h('.flex-column', { - key: 'ethWarning', - style: { - paddingTop: '25px', - marginRight: '30px', - marginLeft: '30px', - alignItems: 'center', - }, - }, [ - h('.warning', { - style: { - margin: '10px 10px 10px 10px', - }, - }, - `MetaMask is currently in beta; use - caution in storing large - amounts of ether. - `), - - h('i.fa.fa-exclamation-triangle.fa-4', { - style: { - fontSize: '152px', - color: '#AEAEAE', - textAlign: 'center', - }, - }), - - h('.flex-row', { - style: { - marginTop: '25px', - marginBottom: '10px', - }, - }, [ - h('input', { - type: 'checkbox', - onChange: this.toggleShowWarning.bind(this), - }), - h('.warning', { - style: { - fontSize: '11px', - }, - - }, 'Don\'t show me this message again'), - ]), - h('.flex-row', { - style: { - width: '100%', - justifyContent: 'space-around', - }, - }, [ - h('button', { - onClick: this.toAccounts.bind(this), - }, - 'Continue to MetaMask'), - ]), - ]) - ) -} - -EthStoreWarning.prototype.toggleShowWarning = function () { - this.props.dispatch(actions.agreeToEthWarning()) -} - -EthStoreWarning.prototype.toAccounts = function () { - this.props.dispatch(actions.showAccountDetail(this.props.account)) -} diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 5b3f44d68..d34cd1c2a 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', }, diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 84953d734..aa809b333 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: {}, @@ -34,11 +33,6 @@ 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, |