From bcad36994d4229531b08a7490364f16859a2c9dc Mon Sep 17 00:00:00 2001 From: Alka Prasad Date: Thu, 19 Dec 2024 06:32:20 +0530 Subject: [PATCH] [INJIMOB-2571]: remove unsed code related to new label for backup and restore (#1747) Signed-off-by: Alka Prasad --- .../backupAndRestoreSetupMachine.ts | 7 ------- machines/settings.ts | 8 -------- .../BackupAndRestoreSetupController.ts | 12 ------------ 3 files changed, 27 deletions(-) diff --git a/machines/backupAndRestore/backupAndRestoreSetup/backupAndRestoreSetupMachine.ts b/machines/backupAndRestore/backupAndRestoreSetup/backupAndRestoreSetupMachine.ts index 2c6c7e0a42..fc30615db1 100644 --- a/machines/backupAndRestore/backupAndRestoreSetup/backupAndRestoreSetupMachine.ts +++ b/machines/backupAndRestore/backupAndRestoreSetup/backupAndRestoreSetupMachine.ts @@ -236,10 +236,3 @@ export const backupAndRestoreSetupMachine = model.createMachine( guards: backupAndRestoreSetupGaurds(), }, ); - -export function createBackupAndRestoreSetupMachine(serviceRefs: AppServices) { - return backupAndRestoreSetupMachine.withContext({ - ...backupAndRestoreSetupMachine.context, - serviceRefs, - }); -} diff --git a/machines/settings.ts b/machines/settings.ts index 23564945e8..e66fcc6ccc 100644 --- a/machines/settings.ts +++ b/machines/settings.ts @@ -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}), @@ -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'], }, @@ -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 diff --git a/screens/backupAndRestore/BackupAndRestoreSetupController.ts b/screens/backupAndRestore/BackupAndRestoreSetupController.ts index 2f6f071208..bcce58e707 100644 --- a/screens/backupAndRestore/BackupAndRestoreSetupController.ts +++ b/screens/backupAndRestore/BackupAndRestoreSetupController.ts @@ -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'; @@ -35,10 +33,6 @@ export function useBackupAndRestoreSetup() { }), ); const backupAndRestoreSetupService = useInterpret(machine.current); - const isBackupAndRestoreExplored = useSelector( - settingsService, - selectIsBackUpAndRestoreExplored, - ); const isNetworkErrorDuringAccountSetup = useSelector( backupAndRestoreSetupService, @@ -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,