diff options
Hide Warning after changing import options
Diffstat (limited to 'mascara/src/app/first-time')
-rw-r--r-- | mascara/src/app/first-time/import-account-screen.js | 11 | ||||
-rw-r--r-- | mascara/src/app/first-time/index.js | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/mascara/src/app/first-time/import-account-screen.js b/mascara/src/app/first-time/import-account-screen.js index 17be90c2a..a7af42cd7 100644 --- a/mascara/src/app/first-time/import-account-screen.js +++ b/mascara/src/app/first-time/import-account-screen.js @@ -1,6 +1,6 @@ import React, {Component, PropTypes} from 'react' import classnames from 'classnames' -import {importNewAccount} from '../../../../ui/app/actions' +import {importNewAccount, hideWarning} from '../../../../ui/app/actions' import {connect} from 'react-redux'; const Input = ({ label, placeholder, onChange, errorMessage, type = 'text' }) => ( @@ -29,6 +29,7 @@ class ImportAccountScreen extends Component { back: PropTypes.func.isRequired, next: PropTypes.func.isRequired, importNewAccount: PropTypes.func.isRequired, + hideWarning: PropTypes.func.isRequired, }; state = { @@ -152,7 +153,10 @@ class ImportAccountScreen extends Component { <select className="import-account__dropdown" value={selectedOption} - onChange={e => this.setState({ selectedOption: e.target.value })} + onChange={e => { + this.setState({ selectedOption: e.target.value }) + this.props.hideWarning() + }} > <option value={OPTIONS.PRIVATE_KEY}>Private Key</option> <option value={OPTIONS.JSON_FILE}>JSON File</option> @@ -180,6 +184,7 @@ class ImportAccountScreen extends Component { export default connect( ({ appState: { isLoading, warning } }) => ({ isLoading, warning }), dispatch => ({ - importNewAccount: (strategy, args) => dispatch(importNewAccount(strategy, args)) + importNewAccount: (strategy, args) => dispatch(importNewAccount(strategy, args)), + hideWarning: () => dispatch(hideWarning()), }) )(ImportAccountScreen) diff --git a/mascara/src/app/first-time/index.js b/mascara/src/app/first-time/index.js index 3fcfd8dc5..ff5eb9c4d 100644 --- a/mascara/src/app/first-time/index.js +++ b/mascara/src/app/first-time/index.js @@ -46,7 +46,7 @@ class FirstTimeFlow extends Component { const {isInitialized, seedWords, noActiveNotices} = this.props; const {SCREEN_TYPE} = FirstTimeFlow - return SCREEN_TYPE.BUY_ETHER + // return SCREEN_TYPE.IMPORT_ACCOUNT if (!isInitialized) { return SCREEN_TYPE.CREATE_PASSWORD @@ -100,7 +100,7 @@ class FirstTimeFlow extends Component { case SCREEN_TYPE.BUY_ETHER: return ( <BuyEtherScreen - + /> ) default: |