mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Hide Warning after changing import options
This commit is contained in:
parent
0cc521e130
commit
4ecd28ca9b
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user