status -> wallet_status on wallet_status call

This commit is contained in:
Victor Shyba 2021-03-14 18:21:21 -03:00 committed by Sean Yesmunt
parent 8a016eccb2
commit 1251262e22

View file

@ -112,27 +112,27 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
Lbry.status().then((status) => {
const sdkStatus = status;
const { wallet } = status;
Lbry.wallet_status().then((status) => {
Lbry.wallet_status().then((walletStatus) => {
if (sdkStatus.is_running && wallet && wallet.available_servers) {
if (status.is_locked) {
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);
}
// Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
this.updateStatusCallback(sdkStatus, status, true);
this.updateStatusCallback(sdkStatus, walletStatus, true);
if (launchedModal === false && !modal) {
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
}
} else {
this.updateStatusCallback(sdkStatus, status);
this.updateStatusCallback(sdkStatus, walletStatus);
}
} else if (!sdkStatus.is_running && status.is_syncing) {
} else if (!sdkStatus.is_running && walletStatus.is_syncing) {
// Clear the timeout if wallet is still syncing
if (this.timeout) {
clearTimeout(this.timeout);
}
this.updateStatusCallback(sdkStatus, status);
this.updateStatusCallback(sdkStatus, walletStatus);
} else if (this.state.waitingForWallet > MAX_WALLET_WAIT && launchedModal === false && !modal) {
clearWalletServers();
doShowSnackBar(
@ -141,9 +141,9 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
)
);
this.setState({ waitingForWallet: 0 });
this.updateStatusCallback(sdkStatus, status);
this.updateStatusCallback(sdkStatus, walletStatus);
} else {
this.updateStatusCallback(sdkStatus, status);
this.updateStatusCallback(sdkStatus, walletStatus);
}
});
});