|
|
@ -3,7 +3,6 @@ import PropTypes from 'prop-types' |
|
|
|
import Button from '../../../../components/ui/button' |
|
|
|
import Button from '../../../../components/ui/button' |
|
|
|
import { |
|
|
|
import { |
|
|
|
INITIALIZE_SEED_PHRASE_ROUTE, |
|
|
|
INITIALIZE_SEED_PHRASE_ROUTE, |
|
|
|
INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE, |
|
|
|
|
|
|
|
INITIALIZE_SELECT_ACTION_ROUTE, |
|
|
|
INITIALIZE_SELECT_ACTION_ROUTE, |
|
|
|
} from '../../../../helpers/constants/routes' |
|
|
|
} from '../../../../helpers/constants/routes' |
|
|
|
import TextField from '../../../../components/ui/text-field' |
|
|
|
import TextField from '../../../../components/ui/text-field' |
|
|
@ -115,13 +114,6 @@ export default class NewAccount extends PureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleImportWithSeedPhrase = event => { |
|
|
|
|
|
|
|
const { history } = this.props |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event.preventDefault() |
|
|
|
|
|
|
|
history.push(INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toggleTermsCheck = () => { |
|
|
|
toggleTermsCheck = () => { |
|
|
|
this.context.metricsEvent({ |
|
|
|
this.context.metricsEvent({ |
|
|
|
eventOpts: { |
|
|
|
eventOpts: { |
|
|
@ -136,6 +128,12 @@ export default class NewAccount extends PureComponent { |
|
|
|
})) |
|
|
|
})) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onTermsKeyPress = ({key}) => { |
|
|
|
|
|
|
|
if (key === ' ' || key === 'Enter') { |
|
|
|
|
|
|
|
this.toggleTermsCheck() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
render () { |
|
|
|
const { t } = this.context |
|
|
|
const { t } = this.context |
|
|
|
const { password, confirmPassword, passwordError, confirmPasswordError, termsChecked } = this.state |
|
|
|
const { password, confirmPassword, passwordError, confirmPasswordError, termsChecked } = this.state |
|
|
@ -195,10 +193,17 @@ export default class NewAccount extends PureComponent { |
|
|
|
largeLabel |
|
|
|
largeLabel |
|
|
|
/> |
|
|
|
/> |
|
|
|
<div className="first-time-flow__checkbox-container" onClick={this.toggleTermsCheck}> |
|
|
|
<div className="first-time-flow__checkbox-container" onClick={this.toggleTermsCheck}> |
|
|
|
<div className="first-time-flow__checkbox"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="first-time-flow__checkbox" |
|
|
|
|
|
|
|
tabIndex="0" |
|
|
|
|
|
|
|
role="checkbox" |
|
|
|
|
|
|
|
onKeyPress={this.onTermsKeyPress} |
|
|
|
|
|
|
|
aria-checked={termsChecked} |
|
|
|
|
|
|
|
aria-labelledby="ftf-chk1-label" |
|
|
|
|
|
|
|
> |
|
|
|
{termsChecked ? <i className="fa fa-check fa-2x" /> : null} |
|
|
|
{termsChecked ? <i className="fa fa-check fa-2x" /> : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span className="first-time-flow__checkbox-label"> |
|
|
|
<span id="ftf-chk1-label" className="first-time-flow__checkbox-label"> |
|
|
|
I have read and agree to the <a |
|
|
|
I have read and agree to the <a |
|
|
|
href="https://metamask.io/terms.html" |
|
|
|
href="https://metamask.io/terms.html" |
|
|
|
target="_blank" |
|
|
|
target="_blank" |
|
|
|