import React, {Component} from "react"; import PropTypes from "prop-types"; import {Field, reduxForm} from "redux-form"; import GenerateWalletPasswordInputComponent from "./GenerateWalletPasswordInputComponent"; // 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) this.state = { hasDownloaded: false } } static propTypes = { title: PropTypes.string, body: PropTypes.string, userId: PropTypes.number, id: PropTypes.number, generateWalletPassword: PropTypes.object, showPassword: PropTypes.bool, showGenerateWalletPasswordAction: PropTypes.func, generateWalletFileAction: PropTypes.func, generateWalletFile: PropTypes.bool }; continueToPaper() { } downloaded() { let nextState = this.state nextState.hasDownloaded = true this.setState(nextState) } render() { const { // handleSubmit, // pristine, // reset, // submitting, generateWalletPassword, showPassword, showGenerateWalletPasswordAction, generateWalletFileAction, generateWalletFile } = this.props; return (

{ !generateWalletFile && (

Generate Wallet

Enter a strong password (at least 9 characters)


) } { generateWalletFile && (

Save your Wallet File. Don't forget your password.


this.downloaded()}>Download

This Keystore file matches the format used by Mist so you can easily import it in the future. It is the recommended file to download and back up.





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).

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