only record user once

This commit is contained in:
Sean Yesmunt 2018-08-20 12:33:36 -04:00
parent 190386ae4c
commit d1d1e32063

View file

@ -35,6 +35,8 @@ export class SplashScreen extends React.PureComponent<Props, State> {
isRunning: false,
launchedModal: false,
};
this.hasRecordedUser = false;
}
componentDidMount() {
@ -65,8 +67,9 @@ export class SplashScreen extends React.PureComponent<Props, State> {
const { notifyUnlockWallet, authenticate } = this.props;
const { launchedModal } = this.state;
if (status) {
if (!this.hasRecordedUser && status) {
authenticate();
this.hasRecordedUser = true;
}
if (status.wallet && status.wallet.is_locked) {
@ -119,6 +122,8 @@ export class SplashScreen extends React.PureComponent<Props, State> {
}, 500);
}
hasRecordedUser: boolean;
render() {
const { notification } = this.props;
const { message, details, isRunning } = this.state;