quick fix for splash screen unlocking
This commit is contained in:
parent
70a6b7b056
commit
98ee0b1500
1 changed files with 33 additions and 29 deletions
|
@ -119,25 +119,31 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
|
||||
// If the wallet is locked, stop doing anything and make the user input their password
|
||||
if (status.is_running) {
|
||||
return Lbry.wallet_status().then(walletStatus => {
|
||||
if (walletStatus.is_locked) {
|
||||
// Clear the error timeout, it might sit on this step for a while until someone enters their password
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
}
|
||||
|
||||
Lbry.wallet_status().then(walletStatus => {
|
||||
if (walletStatus.is_locked) {
|
||||
// Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
|
||||
if (launchedModal === false && !modal) {
|
||||
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
||||
|
||||
setTimeout(() => {
|
||||
this.updateStatus();
|
||||
}, 500);
|
||||
}
|
||||
} else {
|
||||
return Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||
if (!this.timeout) {
|
||||
this.adjustErrorTimeout();
|
||||
}
|
||||
|
||||
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||
this.setState({ isRunning: true }, () => this.continueAppLaunch());
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (blockchainHeaders) {
|
||||
} else if (blockchainHeaders) {
|
||||
const blockChainHeaders = blockchainHeaders;
|
||||
if (blockChainHeaders.download_progress < 100) {
|
||||
this.setState({
|
||||
|
@ -146,8 +152,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
});
|
||||
}
|
||||
} else if (wallet && wallet.blocks_behind > 0) {
|
||||
const amountBehind =
|
||||
wallet.blocks_behind === 1 ? '%amountBehind% block behind' : '%amountBehind% blocks behind';
|
||||
const amountBehind = wallet.blocks_behind === 1 ? '%amountBehind% block behind' : '%amountBehind% blocks behind';
|
||||
this.setState({
|
||||
message: __('Blockchain Sync'),
|
||||
details: `${__('Catching up...')} (${__(amountBehind, { amountBehind: wallet.blocks_behind })})`,
|
||||
|
@ -163,7 +168,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
this.updateStatus();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
runWithIncompatibleDaemon() {
|
||||
const { hideModal } = this.props;
|
||||
|
|
Loading…
Add table
Reference in a new issue