import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {Field, reduxForm} from 'redux-form'; import GenerateWalletPasswordInputComponent from './GenerateWalletPasswordInputComponent'; import LedgerTrezorWarning from './LedgerTrezorWarning'; import translate from 'translations'; // VALIDATORS const minLength = min => value => { return value && value.length < min ? `Must be ${min} characters or more` : undefined }; const minLength9 = minLength(9); const required = value => value ? undefined : 'Required'; class GenerateWalletPasswordComponent extends Component { constructor(props) { super(props) } static propTypes = { // state title: PropTypes.string, body: PropTypes.string, userId: PropTypes.number, id: PropTypes.number, generateWalletPassword: PropTypes.object, showPassword: PropTypes.bool, generateWalletFile: PropTypes.bool, hasDownloadedWalletFile: PropTypes.bool, canProceedToPaper: PropTypes.bool, // actions SHOW_GENERATE_WALLET_PASSWORD_ACTION: PropTypes.func, GENERATE_WALLET_FILE_ACTION: PropTypes.func, GENERATE_WALLET_HAS_DOWNLOADED_FILE_ACTION: PropTypes.func, GENERATE_WALLET_CONTINUE_TO_PAPER_ACTION: PropTypes.func }; continueToPaper() { } downloaded() { let nextState = this.state; nextState.hasDownloadedWalletFile = true; this.setState(nextState) } render() { const { generateWalletPassword, showPassword, generateWalletFile, hasDownloadedWalletFile, SHOW_GENERATE_WALLET_PASSWORD_ACTION, GENERATE_WALLET_FILE_ACTION, GENERATE_WALLET_HAS_DOWNLOADED_FILE_ACTION, GENERATE_WALLET_CONTINUE_TO_PAPER_ACTION } = this.props; return (

{ !generateWalletFile && (

{translate('NAV_GenerateWallet')}

{translate('HELP_1_Desc_3')}


) } { generateWalletFile && (

{translate('GEN_Label_2')}


GENERATE_WALLET_HAS_DOWNLOADED_FILE_ACTION()}>{translate('x_Download')}

{translate('x_KeystoreDesc')}





MyEtherWallet.com is not a web wallet & does not store or transmit this secret information at any time.
If you do not save your wallet file and password, we cannot recover them.
Save your wallet file now & back it up in a second location (not on your computer).

GENERATE_WALLET_CONTINUE_TO_PAPER_ACTION()}> I understand. Continue.
) }
) } } export default reduxForm({ form: 'generateWalletPassword' // a unique name for this form })(GenerateWalletPasswordComponent);