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