Please give this account a name:
@@ -64,9 +96,9 @@ class AccountName extends Component {
)}
-
+
);
- }
+ };
}
export default AccountName;
diff --git a/packages/fether-react/src/Accounts/CreateAccount/AccountPassword/AccountPassword.js b/packages/fether-react/src/Accounts/CreateAccount/AccountPassword/AccountPassword.js
index 2b5cea63407118b215ea5d5a93d8092847630dcd..668e67e9b1ad63bf39cbe4f1398f3a196b7319a5 100644
--- a/packages/fether-react/src/Accounts/CreateAccount/AccountPassword/AccountPassword.js
+++ b/packages/fether-react/src/Accounts/CreateAccount/AccountPassword/AccountPassword.js
@@ -4,11 +4,9 @@
// SPDX-License-Identifier: BSD-3-Clause
import React, { Component } from 'react';
-import { FormField } from 'fether-ui';
+import { AccountCard, FormField } from 'fether-ui';
import { inject, observer } from 'mobx-react';
-import CreateAccountContainer from '../CreateAccountContainer';
-
@inject('createAccountStore')
@observer
class AccountPassword extends Component {
@@ -25,55 +23,62 @@ class AccountPassword extends Component {
this.setState({ password: value });
};
- handleSubmit = () => {
- const {
- createAccountStore,
- history,
- location: { pathname }
- } = this.props;
+ handleSubmit = event => {
+ const { createAccountStore, history } = this.props;
const { password } = this.state;
- createAccountStore.setPassword(password);
- const currentStep = pathname.slice(-1);
- history.push(`/accounts/new/${+currentStep + 1}`);
+ event.preventDefault();
+
+ // Save to parity
+ createAccountStore.saveAccountToParity(password).then(() => {
+ createAccountStore.clear();
+ history.push('/accounts');
+ });
};
render () {
+ const {
+ createAccountStore: { address, name }
+ } = this.props;
const { confirm, password } = this.state;
return (
-