add additional catch for second sync_apply

This commit is contained in:
Sean Yesmunt 2019-10-21 11:56:19 -04:00
parent fb2e73ab31
commit f731973f8f
3 changed files with 12 additions and 4 deletions

2
dist/bundle.es.js vendored
View file

@ -2501,6 +2501,8 @@ function doGetSync(passedPassword, callback) {
}) => {
dispatch(doSetSync('', walletHash, syncApplyData, password));
handleCallback();
}).catch(error => {
handleCallback(error);
});
}
});

2
dist/bundle.js vendored
View file

@ -4067,6 +4067,8 @@ function doGetSync(passedPassword, callback) {
syncApplyData = _ref.data;
dispatch(doSetSync('', walletHash, syncApplyData, password));
handleCallback();
})["catch"](function (error) {
handleCallback(error);
});
}
});

View file

@ -151,10 +151,14 @@ export function doGetSync(passedPassword, callback) {
// call sync_apply to get data to sync
// first time sync. use any string for old hash
Lbry.sync_apply({ password }).then(({ hash: walletHash, data: syncApplyData }) => {
dispatch(doSetSync('', walletHash, syncApplyData, password));
handleCallback();
});
Lbry.sync_apply({ password })
.then(({ hash: walletHash, data: syncApplyData }) => {
dispatch(doSetSync('', walletHash, syncApplyData, password));
handleCallback();
})
.catch(error => {
handleCallback(error);
});
}
});
};