only record user once
This commit is contained in:
parent
190386ae4c
commit
d1d1e32063
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue