Browse Source

clear login state

v0.25
pbca26 7 years ago
parent
commit
237ba5435d
  1. 5
      react/src/components/login/login.js

5
react/src/components/login/login.js

@ -65,6 +65,7 @@ class Login extends React.Component {
selectedShortcutNative: '', selectedShortcutNative: '',
selectedShortcutSPV: '', selectedShortcutSPV: '',
}; };
this.defaultState = JSON.parse(JSON.stringify(this.state));
this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this); this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this);
this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this); this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this);
this.updateLoginPassPhraseInput = this.updateLoginPassPhraseInput.bind(this); this.updateLoginPassPhraseInput = this.updateLoginPassPhraseInput.bind(this);
@ -244,6 +245,8 @@ class Login extends React.Component {
display: true, display: true,
activeLoginSection: this.state.activeLoginSection !== 'signup' ? 'login' : 'signup', activeLoginSection: this.state.activeLoginSection !== 'signup' ? 'login' : 'signup',
}); });
console.warn(props);
} }
if (props.Main && if (props.Main &&
@ -348,6 +351,8 @@ class Login extends React.Component {
Store.dispatch(shepherdElectrumAuth(this.state.loginPassphrase)); Store.dispatch(shepherdElectrumAuth(this.state.loginPassphrase));
Store.dispatch(shepherdElectrumCoins()); Store.dispatch(shepherdElectrumCoins());
} }
this.setState(this.defaultState);
} }
loadPinList() { loadPinList() {

Loading…
Cancel
Save