diff --git a/src/page/firstRun/view.js b/src/page/firstRun/view.js index f3a24ea..ffeb8f8 100644 --- a/src/page/firstRun/view.js +++ b/src/page/firstRun/view.js @@ -300,12 +300,19 @@ class FirstRunScreen extends React.PureComponent { if (NativeModules.UtilityModule) { const newPassword = this.state.walletPassword ? this.state.walletPassword : ''; NativeModules.UtilityModule.setSecureValue(Constants.KEY_WALLET_PASSWORD, newPassword); - Lbry.wallet_encrypt({ new_password: newPassword }).then(() => { - // fresh account, new password set + if (newPassword.trim().length === 0) { + // blank password. Do not encrypt getSync(newPassword); setClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED, true); this.closeFinalPage(); - }); + } else { + Lbry.wallet_encrypt({ new_password: newPassword }).then(() => { + // fresh account, new password set + getSync(newPassword); + setClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED, true); + this.closeFinalPage(); + }); + } } }; diff --git a/src/page/verification/internal/sync-verify-page.js b/src/page/verification/internal/sync-verify-page.js index 952bc49..8185196 100644 --- a/src/page/verification/internal/sync-verify-page.js +++ b/src/page/verification/internal/sync-verify-page.js @@ -37,11 +37,17 @@ class SyncVerifyPage extends React.PureComponent { if (!hasSyncedWallet) { // fresh account with no sync const newPassword = this.state.password ? this.state.password : ''; - Lbry.wallet_encrypt({ new_password: newPassword }).then(() => { + if (newPassword.trim().length === 0) { getSync(newPassword); setClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED, true); navigation.goBack(); - }); + } else { + Lbry.wallet_encrypt({ new_password: newPassword }).then(() => { + getSync(newPassword); + setClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED, true); + navigation.goBack(); + }); + } } else { syncApply(syncHash, syncData, this.state.password ? this.state.password : ''); }