From e9762946a84826f688c007fe45c7092b5c8901f7 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Tue, 8 May 2018 16:10:09 +0200 Subject: [PATCH 1/8] Add steps to create account --- src/Accounts/Accounts.js | 32 +++++++- src/Accounts/CreateAccount/CreateAccount.js | 29 +++++++ .../CreateAccountStep1/CreateAccountStep1.js | 57 ++++++++++++++ .../CreateAccount/CreateAccountStep1/index.js | 8 ++ .../CreateAccountStep2/CreateAccountStep2.js | 33 ++++++++ .../CreateAccount/CreateAccountStep2/index.js | 8 ++ .../CreateAccountStep3/CreateAccountStep3.js | 46 +++++++++++ .../CreateAccount/CreateAccountStep3/index.js | 8 ++ .../CreateAccountStep4/CreateAccountStep4.js | 77 ++++++++++++++++++ .../CreateAccount/CreateAccountStep4/index.js | 8 ++ .../CreateAccountStep5/CreateAccountStep5.js | 38 +++++++++ .../CreateAccount/CreateAccountStep5/index.js | 8 ++ src/App/App.js | 30 +++---- src/stores/ParityStore.js | 9 ++- src/stores/TokensStore.js | 6 +- src/stores/createAccountStore.js | 78 +++++++++++++++++++ src/stores/index.js | 10 ++- 17 files changed, 461 insertions(+), 24 deletions(-) create mode 100644 src/Accounts/CreateAccount/CreateAccount.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep1/index.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep2/index.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep3/index.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep4/index.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js create mode 100644 src/Accounts/CreateAccount/CreateAccountStep5/index.js create mode 100644 src/stores/createAccountStore.js diff --git a/src/Accounts/Accounts.js b/src/Accounts/Accounts.js index 73248483..bbbce0f4 100644 --- a/src/Accounts/Accounts.js +++ b/src/Accounts/Accounts.js @@ -6,8 +6,36 @@ import React, { Component } from 'react'; class Accounts extends Component { - render () { - return
This is the accounts page.
; + handleChange = ({ target: { value } }) => { + setDefaultAccount$(value); + }; + + render() { + const { accounts } = this.props; + + return ( +
+

Current account:

+ {accounts ? ( + + ) : ( +

Loading Accounts...

+ )} + +

+ {/* @brian TODO Inline style is ugly */} + + + +

+
+ ); } } diff --git a/src/Accounts/CreateAccount/CreateAccount.js b/src/Accounts/CreateAccount/CreateAccount.js new file mode 100644 index 00000000..26b405d2 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccount.js @@ -0,0 +1,29 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { Route } from 'react-router-dom'; + +import Step1 from './CreateAccountStep1'; +import Step2 from './CreateAccountStep2'; +import Step3 from './CreateAccountStep3'; +import Step4 from './CreateAccountStep4'; +import Step5 from './CreateAccountStep5'; + +class CreateAccount extends Component { + render() { + return ( +
+ + + + + +
+ ); + } +} + +export default CreateAccount; diff --git a/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js b/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js new file mode 100644 index 00000000..dfe5e5b2 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js @@ -0,0 +1,57 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import { Link } from 'react-router-dom'; + +@inject('createAccountStore') +@observer +class CreateAccountStep1 extends Component { + componentDidMount() { + this.props.createAccountStore.generateNewAccount(); + } + + handleChange = ({ target: { value } }) => + this.props.createAccountStore.setName(value); + + render() { + const { + createAccountStore: { address, generateNewAccount, name, phrase }, + location: { pathname } + } = this.props; + + return ( +
+

Create account

+
+ Your new address:
[BLOCKIE]
{address} 
+ {pathname === '/accounts/new' && ( + + )} +
+ + {pathname === '/accounts/new' && + !!name && ( +
+ + + +
+ )} +
+ ); + } +} + +export default CreateAccountStep1; diff --git a/src/Accounts/CreateAccount/CreateAccountStep1/index.js b/src/Accounts/CreateAccount/CreateAccountStep1/index.js new file mode 100644 index 00000000..4d231b66 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep1/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import CreateAccountStep1 from './CreateAccountStep1'; + +export default CreateAccountStep1; diff --git a/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js b/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js new file mode 100644 index 00000000..4cde411a --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js @@ -0,0 +1,33 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import { Link } from 'react-router-dom'; + +@inject('createAccountStore') +@observer +class CreateAccountStep2 extends Component { + render() { + const { + createAccountStore: { phrase } + } = this.props; + + return ( +
+

Create account step 2

+
+ Please write your secret phrase on a piece of paper:
+
{phrase}
+
+ + + +
+ ); + } +} + +export default CreateAccountStep2; diff --git a/src/Accounts/CreateAccount/CreateAccountStep2/index.js b/src/Accounts/CreateAccount/CreateAccountStep2/index.js new file mode 100644 index 00000000..c9ab4570 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep2/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import CreateAccountStep2 from './CreateAccountStep2'; + +export default CreateAccountStep2; diff --git a/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js b/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js new file mode 100644 index 00000000..2e22c982 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js @@ -0,0 +1,46 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import { Link } from 'react-router-dom'; + +@inject('createAccountStore') +@observer +class CreateAccountStep3 extends Component { + state = { + value: '' + }; + + handleChange = ({ target: { value } }) => this.setState({ value }); + + render() { + const { + createAccountStore: { phrase } + } = this.props; + const { value } = this.state; + + return ( +
+

Create account step 3

+
+ Please rewrite your whole phrase here
+ +
+ + @brian maybe tell the user to write the 3rd, 9th and 11th word only? + 3,9,11 being random numbers + + {value === phrase && ( + + + + )} +
+ ); + } +} + +export default CreateAccountStep3; diff --git a/src/Accounts/CreateAccount/CreateAccountStep3/index.js b/src/Accounts/CreateAccount/CreateAccountStep3/index.js new file mode 100644 index 00000000..4234552c --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep3/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import CreateAccountStep3 from './CreateAccountStep3'; + +export default CreateAccountStep3; diff --git a/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js b/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js new file mode 100644 index 00000000..f4f4cb42 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js @@ -0,0 +1,77 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; +import { Link } from 'react-router-dom'; + +@inject('createAccountStore') +@observer +class CreateAccountStep3 extends Component { + state = { + confirm: '', + hint: '', + password: '' + }; + + handleConfirmChange = ({ target: { value } }) => { + this.setState({ confirm: value }); + }; + + handleHintChange = ({ target: { value } }) => { + this.setState({ hint: value }); + }; + + handlePasswordChange = ({ target: { value } }) => { + this.setState({ password: value }); + }; + + handleSubmit = () => { + const { createAccountStore, history } = this.props; + const { hint, password } = this.state; + createAccountStore.setPassword(password); + createAccountStore.setHint(hint); + history.push('/accounts/new/step5'); + }; + + render() { + const { confirm, hint, password } = this.state; + + return ( +
+

Create account step 4

+
+ +
+ +
+ + {password && confirm === password && } +
+
+ ); + } +} + +export default CreateAccountStep3; diff --git a/src/Accounts/CreateAccount/CreateAccountStep4/index.js b/src/Accounts/CreateAccount/CreateAccountStep4/index.js new file mode 100644 index 00000000..c959872c --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep4/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import CreateAccountStep4 from './CreateAccountStep4'; + +export default CreateAccountStep4; diff --git a/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js b/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js new file mode 100644 index 00000000..d0b0f002 --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js @@ -0,0 +1,38 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; +import { inject, observer } from 'mobx-react'; + +@inject('createAccountStore') +@observer +class CreateAccountStep5 extends Component { + handleSubmit = () => { + const { + createAccountStore: { saveAccountToParity }, + history + } = this.props; + saveAccountToParity().then(() => history.push('/settings')); + }; + + render() { + const { + createAccountStore: { hint } + } = this.props; + + return ( +
+

Create account step 5

+

Confirm account creation?

+

+ Password Hint: {hint} +

+ +
+ ); + } +} + +export default CreateAccountStep5; diff --git a/src/Accounts/CreateAccount/CreateAccountStep5/index.js b/src/Accounts/CreateAccount/CreateAccountStep5/index.js new file mode 100644 index 00000000..07ea8a6b --- /dev/null +++ b/src/Accounts/CreateAccount/CreateAccountStep5/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import CreateAccountStep5 from './CreateAccountStep5'; + +export default CreateAccountStep5; diff --git a/src/App/App.js b/src/App/App.js index f5f0e82d..fc5acdad 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -19,27 +19,29 @@ const Router = process.env.NODE_ENV === 'production' ? MemoryRouter : BrowserRouter; class App extends Component { - render () { + render() { return ( -
-
-
- - +
+
+
+ +
-
- - - - +
+ + + + -
- + + + diff --git a/src/Settings/Settings.js b/src/Settings/Settings.js new file mode 100644 index 00000000..c9c343df --- /dev/null +++ b/src/Settings/Settings.js @@ -0,0 +1,21 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import React, { Component } from 'react'; + +import Accounts from '../Accounts'; + +class Settings extends Component { + render() { + return ( +
+

This is the settings page.

+ +
+ ); + } +} + +export default Settings; diff --git a/src/Settings/index.js b/src/Settings/index.js new file mode 100644 index 00000000..242a4e2c --- /dev/null +++ b/src/Settings/index.js @@ -0,0 +1,8 @@ +// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// This file is part of Parity. +// +// SPDX-License-Identifier: MIT + +import Settings from './Settings'; + +export default Settings; diff --git a/src/Tokens/EthBalance/EthBalance.js b/src/Tokens/EthBalance/EthBalance.js index e0faf5f1..26a12461 100644 --- a/src/Tokens/EthBalance/EthBalance.js +++ b/src/Tokens/EthBalance/EthBalance.js @@ -5,6 +5,7 @@ import React, { Component } from 'react'; import { balanceOf$ } from '@parity/light.js'; +import { Link } from 'react-router-dom'; import BalanceLayout from '../BalanceLayout'; import light from '../../hoc'; @@ -13,8 +14,12 @@ import light from '../../hoc'; balance: ({ address }) => balanceOf$(address) }) class EthBalance extends Component { - render () { - return ; + render() { + return ( + + + + ); } } diff --git a/yarn.lock b/yarn.lock index 7ae966e4..d518625e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -46,6 +46,13 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/runtime@^7.0.0-beta.46": + version "7.0.0-beta.46" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-beta.46.tgz#466a9c0498f6d12d054a185981eef742d59d4871" + dependencies: + core-js "^2.5.3" + regenerator-runtime "^0.11.1" + "@babel/template@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" @@ -115,10 +122,11 @@ version "2.1.6" resolved "https://registry.yarnpkg.com/@parity/jsonrpc/-/jsonrpc-2.1.6.tgz#260bbe7dfcec18d59f0bf1668dfd6021452d6452" -"@parity/light.js@https://github.com/parity-js/light.js#4234c236b0b5782fa96aabe27c651eea9d17faaa": +"@parity/light.js@https://github.com/parity-js/light.js#3a03aa86887f42341c13d560a2eff4ff270498cd": version "1.0.0" - resolved "https://github.com/parity-js/light.js#4234c236b0b5782fa96aabe27c651eea9d17faaa" + resolved "https://github.com/parity-js/light.js#3a03aa86887f42341c13d560a2eff4ff270498cd" dependencies: + "@babel/runtime" "^7.0.0-beta.46" "@parity/api" "^2.1.22" memoizee "^0.4.12" rxjs "^6.1.0" @@ -2149,6 +2157,10 @@ core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b" +core-js@^2.5.3: + version "2.5.6" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -7508,7 +7520,7 @@ regenerate@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" -regenerator-runtime@^0.11.0: +regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" -- GitLab From 486132693567d22c0271719400c4cbc800841f12 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Tue, 8 May 2018 17:21:45 +0200 Subject: [PATCH 5/8] Use allAccountsInfo instead of account --- package.json | 2 +- src/Accounts/Accounts.js | 21 +++++++++++++-------- yarn.lock | 4 ++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3328dae9..d8af35c9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ }, "dependencies": { "@parity/api": "^2.1.22", - "@parity/light.js": "https://github.com/parity-js/light.js#3a03aa86887f42341c13d560a2eff4ff270498cd", + "@parity/light.js": "https://github.com/parity-js/light.js#f62bb37782ed32eb74a8bb0cc428632d3a8c6d45", "axios": "^0.18.0", "electron": "^2.0.0", "electron-dl": "^1.11.0", diff --git a/src/Accounts/Accounts.js b/src/Accounts/Accounts.js index c8e2378e..dc2b98a8 100644 --- a/src/Accounts/Accounts.js +++ b/src/Accounts/Accounts.js @@ -4,13 +4,18 @@ // SPDX-License-Identifier: MIT import React, { Component } from 'react'; -import { accounts$, setDefaultAccount$ } from '@parity/light.js'; +import { + allAccountsInfo$, + defaultAccount$, + setDefaultAccount$ +} from '@parity/light.js'; import { Link, Route } from 'react-router-dom'; import light from '../hoc'; @light({ - accounts: accounts$ + allAccountsInfo: allAccountsInfo$, + defaultAccount: defaultAccount$ }) class Accounts extends Component { handleChange = ({ target: { value } }) => { @@ -18,16 +23,16 @@ class Accounts extends Component { }; render() { - const { accounts } = this.props; + const { allAccountsInfo, defaultAccount } = this.props; return (

Current account:

- {accounts ? ( - + {Object.keys(allAccountsInfo).map(address => ( + ))} diff --git a/yarn.lock b/yarn.lock index d518625e..07e4c856 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,9 +122,9 @@ version "2.1.6" resolved "https://registry.yarnpkg.com/@parity/jsonrpc/-/jsonrpc-2.1.6.tgz#260bbe7dfcec18d59f0bf1668dfd6021452d6452" -"@parity/light.js@https://github.com/parity-js/light.js#3a03aa86887f42341c13d560a2eff4ff270498cd": +"@parity/light.js@https://github.com/parity-js/light.js#f62bb37782ed32eb74a8bb0cc428632d3a8c6d45": version "1.0.0" - resolved "https://github.com/parity-js/light.js#3a03aa86887f42341c13d560a2eff4ff270498cd" + resolved "https://github.com/parity-js/light.js#f62bb37782ed32eb74a8bb0cc428632d3a8c6d45" dependencies: "@babel/runtime" "^7.0.0-beta.46" "@parity/api" "^2.1.22" -- GitLab From 716211f203f62390ee4067f1eec7f89615fb7571 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Tue, 8 May 2018 18:09:11 +0200 Subject: [PATCH 6/8] Fix lint --- src/Accounts/Accounts.js | 6 ++-- src/Accounts/CreateAccount/CreateAccount.js | 12 +++---- .../CreateAccountStep1/CreateAccountStep1.js | 8 ++--- .../CreateAccountStep2/CreateAccountStep2.js | 4 +-- .../CreateAccountStep3/CreateAccountStep3.js | 4 +-- .../CreateAccountStep4/CreateAccountStep4.js | 7 ++-- .../CreateAccountStep5/CreateAccountStep5.js | 2 +- src/App/App.js | 34 +++++++++---------- src/Settings/Settings.js | 2 +- src/Tokens/EthBalance/EthBalance.js | 4 +-- src/stores/createAccountStore.js | 3 +- src/stores/parityStore.js | 2 +- src/stores/tokensStore.js | 2 +- 13 files changed, 44 insertions(+), 46 deletions(-) diff --git a/src/Accounts/Accounts.js b/src/Accounts/Accounts.js index dc2b98a8..fc114416 100644 --- a/src/Accounts/Accounts.js +++ b/src/Accounts/Accounts.js @@ -9,7 +9,7 @@ import { defaultAccount$, setDefaultAccount$ } from '@parity/light.js'; -import { Link, Route } from 'react-router-dom'; +import { Link } from 'react-router-dom'; import light from '../hoc'; @@ -22,7 +22,7 @@ class Accounts extends Component { setDefaultAccount$(value); }; - render() { + render () { const { allAccountsInfo, defaultAccount } = this.props; return ( @@ -42,7 +42,7 @@ class Accounts extends Component {

{/* @brian TODO Inline style is ugly */} - +

diff --git a/src/Accounts/CreateAccount/CreateAccount.js b/src/Accounts/CreateAccount/CreateAccount.js index 26b405d2..33a2433e 100644 --- a/src/Accounts/CreateAccount/CreateAccount.js +++ b/src/Accounts/CreateAccount/CreateAccount.js @@ -13,14 +13,14 @@ import Step4 from './CreateAccountStep4'; import Step5 from './CreateAccountStep5'; class CreateAccount extends Component { - render() { + render () { return (
- - - - - + + + + +
); } diff --git a/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js b/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js index dfe5e5b2..1e7a653b 100644 --- a/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js +++ b/src/Accounts/CreateAccount/CreateAccountStep1/CreateAccountStep1.js @@ -10,16 +10,16 @@ import { Link } from 'react-router-dom'; @inject('createAccountStore') @observer class CreateAccountStep1 extends Component { - componentDidMount() { + componentDidMount () { this.props.createAccountStore.generateNewAccount(); } handleChange = ({ target: { value } }) => this.props.createAccountStore.setName(value); - render() { + render () { const { - createAccountStore: { address, generateNewAccount, name, phrase }, + createAccountStore: { address, generateNewAccount, name }, location: { pathname } } = this.props; @@ -44,7 +44,7 @@ class CreateAccountStep1 extends Component { {pathname === '/accounts/new' && !!name && (
- +
diff --git a/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js b/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js index 4cde411a..03671c91 100644 --- a/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js +++ b/src/Accounts/CreateAccount/CreateAccountStep2/CreateAccountStep2.js @@ -10,7 +10,7 @@ import { Link } from 'react-router-dom'; @inject('createAccountStore') @observer class CreateAccountStep2 extends Component { - render() { + render () { const { createAccountStore: { phrase } } = this.props; @@ -22,7 +22,7 @@ class CreateAccountStep2 extends Component { Please write your secret phrase on a piece of paper:
{phrase}
- +
diff --git a/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js b/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js index 2e22c982..afc603e1 100644 --- a/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js +++ b/src/Accounts/CreateAccount/CreateAccountStep3/CreateAccountStep3.js @@ -16,7 +16,7 @@ class CreateAccountStep3 extends Component { handleChange = ({ target: { value } }) => this.setState({ value }); - render() { + render () { const { createAccountStore: { phrase } } = this.props; @@ -34,7 +34,7 @@ class CreateAccountStep3 extends Component { 3,9,11 being random numbers {value === phrase && ( - + )} diff --git a/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js b/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js index f4f4cb42..6e4a0003 100644 --- a/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js +++ b/src/Accounts/CreateAccount/CreateAccountStep4/CreateAccountStep4.js @@ -5,7 +5,6 @@ import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; -import { Link } from 'react-router-dom'; @inject('createAccountStore') @observer @@ -36,7 +35,7 @@ class CreateAccountStep3 extends Component { history.push('/accounts/new/step5'); }; - render() { + render () { const { confirm, hint, password } = this.state; return ( @@ -48,7 +47,7 @@ class CreateAccountStep3 extends Component { @@ -58,7 +57,7 @@ class CreateAccountStep3 extends Component { diff --git a/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js b/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js index d0b0f002..609f0254 100644 --- a/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js +++ b/src/Accounts/CreateAccount/CreateAccountStep5/CreateAccountStep5.js @@ -17,7 +17,7 @@ class CreateAccountStep5 extends Component { saveAccountToParity().then(() => history.push('/settings')); }; - render() { + render () { const { createAccountStore: { hint } } = this.props; diff --git a/src/App/App.js b/src/App/App.js index 4d5edf8d..a8a464b8 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -21,30 +21,30 @@ const Router = process.env.NODE_ENV === 'production' ? MemoryRouter : BrowserRouter; class App extends Component { - render() { + render () { return ( -
-
-
- - +
+
+
+ +
-
- - - - - - +
+ + + + + + -