From 6f6826c88cb39be9be471fc256cce90fc045ceaa Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Wed, 26 Apr 2017 22:16:01 -0500 Subject: [PATCH] Bring in Confirm/Download and wire up initial local state --- .../GenerateWalletPasswordComponent.jsx | 111 +++++++++++++----- 1 file changed, 79 insertions(+), 32 deletions(-) diff --git a/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordComponent.jsx b/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordComponent.jsx index ceda9e76..5f03d38a 100644 --- a/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordComponent.jsx +++ b/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordComponent.jsx @@ -1,8 +1,8 @@ -import React, {Component} from "react"; -import PropTypes from "prop-types"; +import React, {Component} from"react"; +import PropTypes from"prop-types"; -import {Field, reduxForm} from "redux-form"; -import GenerateWalletPasswordInputComponent from "./GenerateWalletPasswordInputComponent"; +import {Field, reduxForm} from"redux-form"; +import GenerateWalletPasswordInputComponent from"./GenerateWalletPasswordInputComponent"; // VALIDATORS @@ -16,6 +16,9 @@ const required = value => value ? undefined : 'Required' class GenerateWalletPasswordComponent extends Component { constructor(props) { super(props) + this.state = { + hasDownloaded: false + } } static propTypes = { @@ -30,6 +33,17 @@ class GenerateWalletPasswordComponent extends Component { generateWalletFile: PropTypes.bool }; + + continueToPaper() { + } + + downloaded() { + let nextState = this.state + nextState.hasDownloaded = true + this.setState(nextState) + } + + render() { const { // handleSubmit, @@ -48,34 +62,67 @@ class GenerateWalletPasswordComponent extends Component {
-
-

Generate Wallet

-
-

Enter a strong password (at least 9 characters)

- -
- - { - generateWalletFile && ( -
-
-

Now you need to confirm that you copied your - seed!

-
) +
- } -
-
+ { + !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. +
+
+
+ ) + }
@@ -85,4 +132,4 @@ class GenerateWalletPasswordComponent extends Component { export default reduxForm({ form: 'generateWalletPassword' // a unique name for this form -})(GenerateWalletPasswordComponent); \ No newline at end of file +})(GenerateWalletPasswordComponent);