Skip to content

Commit

Permalink
Merge branch 'develop' into injimob-2571
Browse files Browse the repository at this point in the history
  • Loading branch information
Alka1703 committed Dec 19, 2024
2 parents 32fb1d5 + bcad369 commit a07a3d6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,3 @@ export const backupAndRestoreSetupMachine = model.createMachine(
guards: backupAndRestoreSetupGaurds(),
},
);

export function createBackupAndRestoreSetupMachine(serviceRefs: AppServices) {
return backupAndRestoreSetupMachine.withContext({
...backupAndRestoreSetupMachine.context,
serviceRefs,
});
}
8 changes: 0 additions & 8 deletions machines/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const model = createModel(
BACK: () => ({}),
CANCEL: () => ({}),
ACCEPT_HARDWARE_SUPPORT_NOT_EXISTS: () => ({}),
SET_IS_BACKUP_AND_RESTORE_EXPLORED: () => ({}),
SET_KEY_MANAGEMENT_EXPLORED: () => ({}),
SET_KEY_MANAGEMENT_TOUR_GUIDE_EXPLORED: () => ({}),
SET_KEY_ORDER_RESPONSE: (status: boolean) => ({status}),
Expand Down Expand Up @@ -138,9 +137,6 @@ export const settingsMachine = model.createMachine(
UPDATE_NAME: {
actions: ['updateName', 'storeContext'],
},
SET_IS_BACKUP_AND_RESTORE_EXPLORED: {
actions: ['setBackupAndRestoreOptionExplored', 'storeContext'],
},
SET_KEY_MANAGEMENT_EXPLORED: {
actions: ['setKeyManagementExplored', 'storeContext'],
},
Expand Down Expand Up @@ -417,10 +413,6 @@ export function selectIsResetInjiProps(state: State) {
return state?.matches('resetInjiProps');
}

export function selectIsBackUpAndRestoreExplored(state: State) {
return state?.context?.isBackupAndRestoreExplored;
}

export function selectIsBiometricUnlock(state: State) {
return (
state.context.isBiometricToggled && state.context.isBiometricUnlockEnabled
Expand Down
12 changes: 0 additions & 12 deletions screens/backupAndRestore/BackupAndRestoreSetupController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
selectShowAccountSelectionConfirmation,
} from '../../machines/backupAndRestore/backupAndRestoreSetup/backupAndRestoreSetupSelectors';
import {GlobalContext} from '../../shared/GlobalContext';
import {selectIsBackUpAndRestoreExplored} from '../../machines/settings';
import {SettingsEvents} from '../../machines/settings';
import {BackupEvents} from '../../machines/backupAndRestore/backup/backupMachine';
import {selectIsNetworkError as selectIsNetworkErrorWhileFetchingLastBackupDetails} from '../../machines/backupAndRestore/backup/backupSelector';

Expand All @@ -35,10 +33,6 @@ export function useBackupAndRestoreSetup() {
}),
);
const backupAndRestoreSetupService = useInterpret(machine.current);
const isBackupAndRestoreExplored = useSelector(
settingsService,
selectIsBackUpAndRestoreExplored,
);

const isNetworkErrorDuringAccountSetup = useSelector(
backupAndRestoreSetupService,
Expand Down Expand Up @@ -81,16 +75,10 @@ export function useBackupAndRestoreSetup() {
backupAndRestoreSetupService,
selectIsSigningInSuccessful,
),
isBackupAndRestoreExplored,
BACKUP_AND_RESTORE: () => {
backupAndRestoreSetupService.send(
BackupAndRestoreSetupEvents.HANDLE_BACKUP_AND_RESTORE(),
);
if (!isBackupAndRestoreExplored) {
settingsService.send(
SettingsEvents.SET_IS_BACKUP_AND_RESTORE_EXPLORED(),
);
}
},
shouldTriggerAutoBackup: useSelector(
backupAndRestoreSetupService,
Expand Down

0 comments on commit a07a3d6

Please sign in to comment.