// @flow import './EnterPassword.scss'; import React, { Component } from 'react'; import { Field, reduxForm } from 'redux-form'; import { Link } from 'react-router'; import translate from 'translations'; import PasswordInput from './PasswordInput'; import Template from './Template'; // 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'); type Props = { walletPasswordForm: Object, showWalletPassword: Function, generateNewWallet: Function }; class EnterPassword extends Component { props: Props; state = { fileName: null, blobURI: null, isPasswordVisible: false }; _onClickGenerateFile = () => { const form = this.props.walletPasswordForm; this.props.generateNewWallet(form.values.password); }; _togglePassword = () => { this.setState({ isPasswordVisible: !this.state.isPasswordVisible }); }; render() { const { walletPasswordForm } = this.props; const { isPasswordVisible } = this.state; const content = (

{translate('NAV_GenerateWallet')}

{translate('x_PasswordDesc')}

); const help = (

Ledger / TREZOR:

Jaxx / Metamask:

Mist / Geth / Parity:

Guides & FAQ

); return