|
|
@ -8,7 +8,8 @@ import { |
|
|
|
startInterval, |
|
|
|
getDexCoins, |
|
|
|
triggerToaster, |
|
|
|
toggleLoginSettingsModal |
|
|
|
toggleLoginSettingsModal, |
|
|
|
stopInterval, |
|
|
|
} from '../../actions/actionCreators'; |
|
|
|
import Config from '../../config'; |
|
|
|
import Store from '../../store'; |
|
|
@ -197,6 +198,7 @@ class Login extends React.Component { |
|
|
|
if (props.Login.pinList === 'no pins') { |
|
|
|
props.Login.pinList = []; |
|
|
|
} |
|
|
|
|
|
|
|
if (props && |
|
|
|
props.Main && |
|
|
|
props.Main.isLoggedIn) { |
|
|
@ -215,21 +217,48 @@ class Login extends React.Component { |
|
|
|
if (props && |
|
|
|
props.Main && |
|
|
|
!props.Main.isLoggedIn) { |
|
|
|
document.body.className = 'page-login layout-full page-dark'; |
|
|
|
|
|
|
|
if (props.Interval && |
|
|
|
props.Interval.interval && |
|
|
|
props.Interval.interval.sync) { |
|
|
|
Store.dispatch( |
|
|
|
stopInterval( |
|
|
|
'sync', |
|
|
|
props.Interval.interval |
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
this.setState({ |
|
|
|
display: true, |
|
|
|
activeLoginSection: this.state.activeLoginSection !== 'signup' ? 'login' : 'signup', |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
if (props.Main && |
|
|
|
props.Main.total === 0) { |
|
|
|
document.body.className = 'page-login layout-full page-dark'; |
|
|
|
|
|
|
|
if (props.Interval && |
|
|
|
props.Interval.interval && |
|
|
|
props.Interval.interval.sync) { |
|
|
|
Store.dispatch( |
|
|
|
stopInterval( |
|
|
|
'sync', |
|
|
|
props.Interval.interval |
|
|
|
) |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.state.activeLoginSection !== 'signup' && |
|
|
|
props && |
|
|
|
props.Main && |
|
|
|
props.Main.isLoggedIn) { |
|
|
|
this.setState({ |
|
|
|
activeLoginSection: 'activateCoin', |
|
|
|
}); |
|
|
|
this.setState({ |
|
|
|
activeLoginSection: 'activateCoin', |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -286,12 +315,6 @@ class Login extends React.Component { |
|
|
|
} |
|
|
|
|
|
|
|
loginSeed() { |
|
|
|
// reset the login pass phrase values so that when the user logs out, the values are clear
|
|
|
|
this.setState({ |
|
|
|
loginPassphrase: null, |
|
|
|
loginPassPhraseSeedType: null, |
|
|
|
}); |
|
|
|
|
|
|
|
if (this.state.shouldEncryptSeed) { |
|
|
|
Store.dispatch(encryptPassphrase(this.state.loginPassphrase, this.state.encryptKey, this.state.pubKey)); |
|
|
|
} |
|
|
@ -306,6 +329,16 @@ class Login extends React.Component { |
|
|
|
shepherdElectrumCoins() |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// reset the login pass phrase values so that when the user logs out, the values are clear
|
|
|
|
this.setState({ |
|
|
|
loginPassphrase: '', |
|
|
|
loginPassPhraseSeedType: null, |
|
|
|
}); |
|
|
|
|
|
|
|
// reset login input vals
|
|
|
|
this.refs.loginPassphrase.value = ''; |
|
|
|
this.refs.loginPassphraseEdit.value = ''; |
|
|
|
} |
|
|
|
|
|
|
|
loadPinList() { |
|
|
@ -362,13 +395,6 @@ class Login extends React.Component { |
|
|
|
} |
|
|
|
|
|
|
|
execWalletCreate() { |
|
|
|
/*Store.dispatch( |
|
|
|
createNewWallet( |
|
|
|
this.state.randomSeedConfirm, |
|
|
|
this.props.Dashboard.activeHandle |
|
|
|
) |
|
|
|
);*/ |
|
|
|
|
|
|
|
Store.dispatch( |
|
|
|
shepherdElectrumAuth(this.state.randomSeedConfirm) |
|
|
|
); |
|
|
|