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));
|
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||||
handleCallback();
|
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;
|
syncApplyData = _ref.data;
|
||||||
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||||
handleCallback();
|
handleCallback();
|
||||||
|
})["catch"](function (error) {
|
||||||
|
handleCallback(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -151,10 +151,14 @@ export function doGetSync(passedPassword, callback) {
|
||||||
|
|
||||||
// call sync_apply to get data to sync
|
// call sync_apply to get data to sync
|
||||||
// first time sync. use any string for old hash
|
// first time sync. use any string for old hash
|
||||||
Lbry.sync_apply({ password }).then(({ hash: walletHash, data: syncApplyData }) => {
|
Lbry.sync_apply({ password })
|
||||||
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
.then(({ hash: walletHash, data: syncApplyData }) => {
|
||||||
handleCallback();
|
dispatch(doSetSync('', walletHash, syncApplyData, password));
|
||||||
});
|
handleCallback();
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
handleCallback(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue