mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-23 09:30:38 +00:00
Logging: add warning log for exception during local storage parsing
This commit is contained in:
parent
90d7b52987
commit
dc3c1985b5
@ -9,7 +9,7 @@ export const loadState = () => {
|
||||
}
|
||||
return JSON.parse(serializedState);
|
||||
} catch (err) {
|
||||
// TODO - log warning? or bubble?
|
||||
console.warn(' Warning: corrupted local storage');
|
||||
}
|
||||
};
|
||||
|
||||
@ -18,7 +18,7 @@ export const saveState = (state: Object) => {
|
||||
const serializedState = JSON.stringify(state);
|
||||
localStorage.setItem(REDUX_STATE, serializedState);
|
||||
} catch (err) {
|
||||
// TODO - log warning? or bubble?
|
||||
console.warn(' Warning: corrupted local storage');
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user