bump lbry-redux and handle other fatal sync errors

This commit is contained in:
Sean Yesmunt 2020-11-12 13:32:18 -05:00
parent cfb10db4ea
commit f1adfddded
6 changed files with 19 additions and 6 deletions

View file

@ -136,7 +136,7 @@
"imagesloaded": "^4.1.4",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#8093d69807d890f4110be0b2aa629e3df5945661",
"lbry-redux": "lbryio/lbry-redux#72ead945cc7cb96e36d67638981ecdc921e5f663",
"lbryinc": "lbryio/lbryinc#2a9d04b2efcae0a68b7315bf04632db4a757461c",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",

View file

@ -8,8 +8,10 @@ export default function SyncFatalError() {
return (
<div className="main--empty">
<Yrbl
title={__('There was an error starting up')}
subtitle={<p>Try refreshing to fix the issue. If that doesn't work, email help@lbry.com for support.</p>}
title={__('There is a bug... somewhere')}
subtitle={
<p>{__("Try refreshing to fix the issue. If that doesn't work, email help@lbry.com for support.")}</p>
}
actions={
<div className="section__actions">
<Button

View file

@ -300,6 +300,7 @@ export const SYNC_APPLY_COMPLETED = 'SYNC_APPLY_COMPLETED';
export const SYNC_APPLY_FAILED = 'SYNC_APPLY_FAILED';
export const SYNC_APPLY_BAD_PASSWORD = 'SYNC_APPLY_BAD_PASSWORD';
export const SYNC_RESET = 'SYNC_RESET';
export const SYNC_FATAL_ERROR = 'SYNC_FATAL_ERROR';
export const REACTIONS_LIST_STARTED = 'REACTIONS_LIST_STARTED';
export const REACTIONS_LIST_FAILED = 'REACTIONS_LIST_FAILED';

View file

@ -653,11 +653,15 @@ export function doGetAndPopulatePreferences() {
message: __('Unable to load your saved preferences.'),
})
);
dispatch({
type: ACTIONS.SYNC_FATAL_ERROR,
});
});
return false;
}
return doPreferenceGet(preferenceKey, successCb, failCb);
return dispatch(doPreferenceGet(preferenceKey, successCb, failCb));
};
}

View file

@ -69,6 +69,7 @@ reducers[ACTIONS.SET_SYNC_FAILED] = (state, action) =>
Object.assign({}, state, {
setSyncIsPending: false,
setSyncErrorMessage: action.data.error,
fatalError: true,
});
reducers[ACTIONS.SET_SYNC_COMPLETED] = (state, action) =>
@ -103,6 +104,11 @@ reducers[ACTIONS.SYNC_APPLY_BAD_PASSWORD] = state =>
syncApplyPasswordError: true,
});
reducers[LBRY_REDUX_ACTIONS.SYNC_FATAL_ERROR] = state =>
Object.assign({}, state, {
fatalError: true,
});
reducers[ACTIONS.SYNC_RESET] = () => defaultState;
export default function syncReducer(state = defaultState, action) {

View file

@ -7411,9 +7411,9 @@ lazy-val@^1.0.4:
yargs "^13.2.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#8093d69807d890f4110be0b2aa629e3df5945661:
lbry-redux@lbryio/lbry-redux#72ead945cc7cb96e36d67638981ecdc921e5f663:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/8093d69807d890f4110be0b2aa629e3df5945661"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/72ead945cc7cb96e36d67638981ecdc921e5f663"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"