fix: blank password bug

This commit is contained in:
Thomas Zarebczan 2019-10-21 08:56:29 -04:00 committed by Sean Yesmunt
parent f360e0990b
commit bcda83ac44
2 changed files with 6 additions and 1 deletions

View file

@ -102,7 +102,10 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
Lbry.status().then(status => {
if (status.is_running) {
Lbry.wallet_status().then(walletStatus => {
if (walletStatus.is_locked) {
// Fix wallet bug and reset encryption status
if (walletStatus.is_encrypted && walletStatus.is_locked === false) {
this.setState({ launchedModal: true }, () => notifyUnlockWallet());
} else 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);

View file

@ -31,6 +31,8 @@ class ModalWalletUnlock extends React.PureComponent<Props, State> {
if (p !== null) {
this.setState({ password: p, rememberPassword: true });
unlockWallet(p);
} else {
unlockWallet('');
}
})
.catch();