add additional catch for second sync_apply
This commit is contained in:
parent
fb2e73ab31
commit
f731973f8f
3 changed files with 12 additions and 4 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -2501,6 +2501,8 @@ function doGetSync(passedPassword, callback) {
|
|||
}) => {
|
||||
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||
handleCallback();
|
||||
}).catch(error => {
|
||||
handleCallback(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
2
dist/bundle.js
vendored
2
dist/bundle.js
vendored
|
@ -4067,6 +4067,8 @@ function doGetSync(passedPassword, callback) {
|
|||
syncApplyData = _ref.data;
|
||||
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||
handleCallback();
|
||||
})["catch"](function (error) {
|
||||
handleCallback(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue