@@ -2,39 +2,25 @@ import React from 'react';
22import useIsAuthenticated from '@hooks/useIsAuthenticated' ;
33import useLocalize from '@hooks/useLocalize' ;
44import useOnyx from '@hooks/useOnyx' ;
5- import usePermissions from '@hooks/usePermissions' ;
65import useThemeStyles from '@hooks/useThemeStyles' ;
76import { isUsingStagingApi } from '@libs/ApiUtils' ;
87import { setShouldFailAllRequests , setShouldForceOffline , setShouldSimulatePoorConnection } from '@userActions/Network' ;
98import { expireSessionWithDelay , invalidateAuthToken , invalidateCredentials } from '@userActions/Session' ;
10- import { setIsDebugModeEnabled , setShouldBlockTransactionThreadReportCreation , setShouldUseStagingServer } from '@userActions/User' ;
9+ import { setIsDebugModeEnabled , setShouldUseStagingServer } from '@userActions/User' ;
1110import CONFIG from '@src/CONFIG' ;
12- import CONST from '@src/CONST' ;
1311import ONYXKEYS from '@src/ONYXKEYS' ;
14- import type { Account as AccountOnyx } from '@src/types/onyx' ;
1512import Button from './Button' ;
1613import SoftKillTestToolRow from './SoftKillTestToolRow' ;
1714import Switch from './Switch' ;
1815import TestCrash from './TestCrash' ;
1916import TestToolRow from './TestToolRow' ;
2017import Text from './Text' ;
2118
22- const ACCOUNT_DEFAULT : AccountOnyx = {
23- isSubscribedToNewsletter : false ,
24- validated : false ,
25- isFromPublicDomain : false ,
26- isUsingExpensifyCard : false ,
27- } ;
28-
2919function TestToolMenu ( ) {
30- const { isBetaEnabled} = usePermissions ( ) ;
3120 const [ network ] = useOnyx ( ONYXKEYS . NETWORK , { canBeMissing : true } ) ;
32- const [ account = ACCOUNT_DEFAULT ] = useOnyx ( ONYXKEYS . ACCOUNT , { canBeMissing : true } ) ;
3321 const [ isUsingImportedState ] = useOnyx ( ONYXKEYS . IS_USING_IMPORTED_STATE , { canBeMissing : true } ) ;
3422 const [ shouldUseStagingServer = isUsingStagingApi ( ) ] = useOnyx ( ONYXKEYS . SHOULD_USE_STAGING_SERVER , { canBeMissing : true } ) ;
3523 const [ isDebugModeEnabled = false ] = useOnyx ( ONYXKEYS . IS_DEBUG_MODE_ENABLED , { canBeMissing : true } ) ;
36- const shouldBlockTransactionThreadReportCreation = ! ! account ?. shouldBlockTransactionThreadReportCreation ;
37- const shouldShowTransactionThreadReportToggle = isBetaEnabled ( CONST . BETAS . NO_OPTIMISTIC_TRANSACTION_THREADS ) ;
3824 const styles = useThemeStyles ( ) ;
3925 const { translate} = useLocalize ( ) ;
4026
@@ -51,17 +37,6 @@ function TestToolMenu() {
5137 </ Text >
5238 { isAuthenticated && (
5339 < >
54- { /* When toggled, the app won't create the transaction thread report. It should be removed together with CONST.BETAS.NO_OPTIMISTIC_TRANSACTION_THREADS beta */ }
55- { shouldShowTransactionThreadReportToggle && (
56- < TestToolRow title = { translate ( 'initialSettingsPage.troubleshoot.shouldBlockTransactionThreadReportCreation' ) } >
57- < Switch
58- accessibilityLabel = { translate ( 'initialSettingsPage.troubleshoot.shouldBlockTransactionThreadReportCreation' ) }
59- isOn = { shouldBlockTransactionThreadReportCreation }
60- onToggle = { ( ) => setShouldBlockTransactionThreadReportCreation ( ! shouldBlockTransactionThreadReportCreation ) }
61- />
62- </ TestToolRow >
63- ) }
64-
6540 { /* When toggled the app will be put into debug mode. */ }
6641 < TestToolRow title = { translate ( 'initialSettingsPage.troubleshoot.debugMode' ) } >
6742 < Switch
0 commit comments