unlock wallet if needed before syncing #70

Merged
neb-b merged 2 commits from sync-unlock into master 2019-10-21 18:16:18 +02:00
neb-b commented 2019-10-16 05:35:33 +02:00 (Migrated from github.com)

Also attempted to make some of the promises easier to follow. I think ideally we would just try to call sync_apply, then if the wallet is locked, call wallet_unlock. However, this is not possible until https://github.com/lbryio/lbry-sdk/issues/1118 is implemented

Also attempted to make some of the promises easier to follow. I think ideally we would just try to call `sync_apply`, then if the wallet is locked, call `wallet_unlock`. However, this is not possible until https://github.com/lbryio/lbry-sdk/issues/1118 is implemented
akinwale (Migrated from github.com) reviewed 2019-10-21 17:51:11 +02:00
akinwale (Migrated from github.com) commented 2019-10-21 17:51:10 +02:00

Should this be dependent on sync_apply completing? If sync_apply fails here, the callback will never be called.

Should this be dependent on `sync_apply` completing? If `sync_apply` fails here, the callback will never be called.
akinwale (Migrated from github.com) reviewed 2019-10-21 17:52:15 +02:00
@ -143,0 +135,4 @@
if (data.hasSyncedWallet) {
const error = 'Error getting synced wallet';
dispatch({
type: ACTIONS.GET_SYNC_FAILED,
akinwale (Migrated from github.com) commented 2019-10-21 17:52:15 +02:00

I guess this is also the same concern as my other comment. Should the callback only be called after sync_apply is done? And what happens if sync_apply fails?

I guess this is also the same concern as my other comment. Should the callback only be called after `sync_apply` is done? And what happens if `sync_apply` fails?
neb-b (Migrated from github.com) reviewed 2019-10-21 17:53:58 +02:00
neb-b (Migrated from github.com) commented 2019-10-21 17:53:58 +02:00

Good point. I'll add another catch to this one

Good point. I'll add another catch to this one
neb-b (Migrated from github.com) reviewed 2019-10-21 17:55:10 +02:00
@ -143,0 +135,4 @@
if (data.hasSyncedWallet) {
const error = 'Error getting synced wallet';
dispatch({
type: ACTIONS.GET_SYNC_FAILED,
neb-b (Migrated from github.com) commented 2019-10-21 17:55:10 +02:00

If it fails here it will be caught down below

If it fails here it will be caught down below
akinwale (Migrated from github.com) approved these changes 2019-10-21 18:14:02 +02:00
akinwale (Migrated from github.com) left a comment

Looks good!

Looks good!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbryinc#70
No description provided.