status -> wallet_status on wallet_status call
This commit is contained in:
parent
8a016eccb2
commit
1251262e22
1 changed files with 8 additions and 8 deletions
|
@ -112,27 +112,27 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
Lbry.status().then((status) => {
|
Lbry.status().then((status) => {
|
||||||
const sdkStatus = status;
|
const sdkStatus = status;
|
||||||
const { wallet } = status;
|
const { wallet } = status;
|
||||||
Lbry.wallet_status().then((status) => {
|
Lbry.wallet_status().then((walletStatus) => {
|
||||||
if (sdkStatus.is_running && wallet && wallet.available_servers) {
|
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
|
// Clear the error timeout, it might sit on this step for a while until someone enters their password
|
||||||
if (this.timeout) {
|
if (this.timeout) {
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
}
|
}
|
||||||
// Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
|
// 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) {
|
if (launchedModal === false && !modal) {
|
||||||
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
// Clear the timeout if wallet is still syncing
|
||||||
if (this.timeout) {
|
if (this.timeout) {
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
}
|
}
|
||||||
this.updateStatusCallback(sdkStatus, status);
|
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||||
} else if (this.state.waitingForWallet > MAX_WALLET_WAIT && launchedModal === false && !modal) {
|
} else if (this.state.waitingForWallet > MAX_WALLET_WAIT && launchedModal === false && !modal) {
|
||||||
clearWalletServers();
|
clearWalletServers();
|
||||||
doShowSnackBar(
|
doShowSnackBar(
|
||||||
|
@ -141,9 +141,9 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
this.setState({ waitingForWallet: 0 });
|
this.setState({ waitingForWallet: 0 });
|
||||||
this.updateStatusCallback(sdkStatus, status);
|
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||||
} else {
|
} else {
|
||||||
this.updateStatusCallback(sdkStatus, status);
|
this.updateStatusCallback(sdkStatus, walletStatus);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue