add blocking param for sync_apply call

This commit is contained in:
Sean Yesmunt 2020-01-07 17:01:26 -05:00
parent 37b09fcce1
commit 6042c6f7bb
3 changed files with 7 additions and 5 deletions

3
dist/bundle.es.js vendored
View file

@ -2534,7 +2534,8 @@ function doGetSync(passedPassword, callback) {
if (response.changed) { if (response.changed) {
return lbryRedux.Lbry.sync_apply({ return lbryRedux.Lbry.sync_apply({
password, password,
data: response.data data: response.data,
blocking: true
}); });
} }
}).then(response => { }).then(response => {

7
dist/bundle.js vendored
View file

@ -6193,13 +6193,13 @@ function doSetSync(oldHash, newHash, data) {
function doGetSync(passedPassword, callback) { function doGetSync(passedPassword, callback) {
var password = passedPassword === null || passedPassword === undefined ? '' : passedPassword; var password = passedPassword === null || passedPassword === undefined ? '' : passedPassword;
function handleCallback() { function handleCallback(error) {
if (callback) { if (callback) {
if (typeof callback !== 'function') { if (typeof callback !== 'function') {
throw new Error('Second argument passed to "doGetSync" must be a function'); throw new Error('Second argument passed to "doGetSync" must be a function');
} }
callback(); callback(error);
} }
} }
@ -6229,7 +6229,8 @@ function doGetSync(passedPassword, callback) {
if (response.changed) { if (response.changed) {
return lbry_redux__WEBPACK_IMPORTED_MODULE_2__["Lbry"].sync_apply({ return lbry_redux__WEBPACK_IMPORTED_MODULE_2__["Lbry"].sync_apply({
password: password, password: password,
data: response.data data: response.data,
blocking: true
}); });
} }
}).then(function (response) { }).then(function (response) {

View file

@ -112,7 +112,7 @@ export function doGetSync(passedPassword, callback) {
data.hasSyncedWallet = true; data.hasSyncedWallet = true;
if (response.changed) { if (response.changed) {
return Lbry.sync_apply({ password, data: response.data }); return Lbry.sync_apply({ password, data: response.data, blocking: true });
} }
}) })
.then(response => { .then(response => {