From 54f96c795bb6e478990d87fdc3bc2ab993165fe4 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Mon, 26 Jun 2017 00:06:27 -0700 Subject: [PATCH] reset login on active section change --- react/src/components/login/login.js | 12 +++++++++++- react/src/components/login/login.render.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/react/src/components/login/login.js b/react/src/components/login/login.js index e51d613..cd631ab 100644 --- a/react/src/components/login/login.js +++ b/react/src/components/login/login.js @@ -173,9 +173,19 @@ class Login extends React.Component { } updateActiveLoginSection(name) { + // reset login/create form this.setState({ activeLoginSection: name, - }); + loginPassphrase: null, + seedInputVisibility: false, + bitsOption: 256, + randomSeed: PassPhraseGenerator.generatePassPhrase(256), + randomSeedConfirm: '', + isSeedConfirmError: false, + isSeedBlank: false, + displaySeedBackupModal: false, + customWalletSeed: false + }); } execWalletCreate() { diff --git a/react/src/components/login/login.render.js b/react/src/components/login/login.render.js index 4537ba3..f19596b 100644 --- a/react/src/components/login/login.render.js +++ b/react/src/components/login/login.render.js @@ -120,7 +120,7 @@ const LoginRender = function () { onClick={ () => this.toggleCustomWalletSeed() }>
this.toggleCustomWalletSeed() }> { translate('LOGIN.CUSTOM_WALLET_SEED') }