Skip to content

Commit

Permalink
fix(suite): backup check always resulting in error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonexe committed Nov 13, 2024
1 parent 763f9b5 commit ef38e3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/suite/src/actions/recovery/recoveryActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type SeedInputStatus =
export type RecoveryAction =
| { type: typeof RECOVERY.SET_WORDS_COUNT; payload: WordCount }
| { type: typeof RECOVERY.SET_ADVANCED_RECOVERY; payload: boolean }
| { type: typeof RECOVERY.SET_ERROR; payload: string }
| { type: typeof RECOVERY.SET_ERROR; payload: string | undefined }
| { type: typeof RECOVERY.SET_STATUS; payload: SeedInputStatus }
| { type: typeof RECOVERY.RESET_REDUCER };

Expand All @@ -36,7 +36,7 @@ const setAdvancedRecovery = (value: boolean): RecoveryAction => ({
payload: value,
});

const setError = (payload: string): RecoveryAction => ({
const setError = (payload: string | undefined): RecoveryAction => ({
type: RECOVERY.SET_ERROR,
payload,
});
Expand All @@ -60,7 +60,7 @@ const checkSeed = () => async (dispatch: Dispatch, getState: GetState) => {

if (!device?.features) return;

dispatch(setError(''));
dispatch(setError(undefined));

if (device.features.internal_model === DeviceModelInternal.T1B1) {
dispatch(setStatus('waiting-for-confirmation'));
Expand Down Expand Up @@ -101,7 +101,7 @@ const recoverDevice = () => async (dispatch: Dispatch, getState: GetState) => {
if (!device?.features) {
return;
}
dispatch(setError(''));
dispatch(setError(undefined));

if (device.features.internal_model === DeviceModelInternal.T1B1) {
dispatch(setStatus('waiting-for-confirmation'));
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/reducers/recovery/recoveryReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface RecoveryState {
const initialState: RecoveryState = {
advancedRecovery: false,
wordsCount: 12,
error: '',
error: undefined,
status: 'initial',
};

Expand Down

0 comments on commit ef38e3a

Please sign in to comment.