diff --git a/src/CONST/index.ts b/src/CONST/index.ts index b119c440ba46f..c43cf197ecdcf 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -1755,7 +1755,6 @@ const CONST = { SHOW_HOVER_PREVIEW_DELAY: 270, SHOW_HOVER_PREVIEW_ANIMATION_DURATION: 250, ACTIVITY_INDICATOR_TIMEOUT: 10000, - GET_INITIAL_URL_TIMEOUT: 10000, MIN_SMOOTH_SCROLL_EVENT_THROTTLE: 16, }, TELEMETRY: { diff --git a/src/DeepLinkHandler.tsx b/src/DeepLinkHandler.tsx index 65db1850c94d0..4d4010bb744be 100644 --- a/src/DeepLinkHandler.tsx +++ b/src/DeepLinkHandler.tsx @@ -25,7 +25,6 @@ type DeepLinkHandlerProps = { */ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) { const linkingChangeListener = useRef(null); - const initialUrlProcessed = useRef(false); const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT); const [, sessionMetadata] = useOnyx(ONYXKEYS.SESSION); @@ -38,57 +37,24 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) { if (isLoadingOnyxValue(sessionMetadata)) { return; } + // If the app is opened from a deep link, get the reportID (if exists) from the deep link and navigate to the chat report + Linking.getInitialURL().then((url) => { + onInitialUrl(url as Route); - // Guard against stale closures: when deps change and the effect re-runs, the previous - // getInitialURL() promise may still be in-flight. Without this guard, its .then() would - // fire with stale conciergeReportID/introSelected values, causing a duplicate - // openReportFromDeepLink() call. - let cancelled = false; - - // If the app is opened from a deep link, get the reportID (if exists) from the deep link and navigate to the chat report. - // We race against a timeout to prevent permanently blocking NavigationRoot if getInitialURL() never resolves - // (e.g. in HybridApp when OldDot fails to send the URL via native bridge). - Promise.race([ - Linking.getInitialURL(), - new Promise((resolve) => { - setTimeout(() => resolve(null), CONST.TIMING.GET_INITIAL_URL_TIMEOUT); - }), - ]) - .then((url) => { - if (cancelled) { - return; + if (url) { + if (conciergeReportID === undefined) { + Log.info('[Deep link] conciergeReportID is undefined when processing initial URL', false, {url}); } - - initialUrlProcessed.current = true; - onInitialUrl(url as Route); - - if (url) { - if (conciergeReportID === undefined) { - Log.info('[Deep link] conciergeReportID is undefined when processing initial URL', false, {url}); - } - if (introSelected === undefined) { - Log.info('[Deep link] introSelected is undefined when processing initial URL', false, {url}); - } - // Use hasAuthToken() for the latest auth state at call time, since the isAuthenticated - // closure value may be stale on cold start (useOnyx reports 'loaded' before storage completes). - const isCurrentlyAuthenticated = hasAuthToken(); - openReportFromDeepLink(url, allReports, isCurrentlyAuthenticated, conciergeReportID, introSelected, betas); - } else { - Report.doneCheckingPublicRoom(); + if (introSelected === undefined) { + Log.info('[Deep link] introSelected is undefined when processing initial URL', false, {url}); } - - endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.DEEP_LINK); - }) - .catch(() => { - if (cancelled) { - return; - } - - initialUrlProcessed.current = true; - onInitialUrl(null); + openReportFromDeepLink(url, allReports, isAuthenticated, conciergeReportID, introSelected, betas); + } else { Report.doneCheckingPublicRoom(); - endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.DEEP_LINK); - }); + } + + endSpan(CONST.TELEMETRY.SPAN_BOOTSPLASH.DEEP_LINK); + }); // Open chat report from a deep link (only mobile native) linkingChangeListener.current = Linking.addEventListener('url', (state) => { @@ -103,25 +69,11 @@ function DeepLinkHandler({onInitialUrl}: DeepLinkHandlerProps) { }); return () => { - cancelled = true; linkingChangeListener.current?.remove(); }; // eslint-disable-next-line react-hooks/exhaustive-deps -- we only want this effect to re-run when conciergeReportID changes }, [sessionMetadata?.status, conciergeReportID, introSelected, betas]); - // Safety net: if getInitialURL() resolves before the session loads, hasAuthToken() may return false - // for an authenticated user, causing openReportFromDeepLink to take the wrong path. Once isAuthenticated - // settles to true, unblock the UI. The initialUrlProcessed guard ensures this doesn't fire before URL - // resolution. In the common case (isAuthenticated settles first), this is a no-op because - // openReportFromDeepLink's own doneCheckingPublicRoom() call handles it. - useEffect(() => { - if (!isAuthenticated || !initialUrlProcessed.current) { - return; - } - - Report.doneCheckingPublicRoom(); - }, [isAuthenticated]); - return null; } diff --git a/src/Expensify.tsx b/src/Expensify.tsx index 6e468851e34a9..0afde4a09222b 100644 --- a/src/Expensify.tsx +++ b/src/Expensify.tsx @@ -65,9 +65,9 @@ function Expensify() { const {preferredLocale} = useLocalize(); const [accountID] = useOnyx(ONYXKEYS.SESSION, {selector: accountIDSelector}); const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE); - const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM); - const [updateAvailable] = useOnyx(ONYXKEYS.RAM_ONLY_UPDATE_AVAILABLE); - const [updateRequired] = useOnyx(ONYXKEYS.RAM_ONLY_UPDATE_REQUIRED); + const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false}); + const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {initWithStoredValues: false}); + const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {initWithStoredValues: false}); const [lastVisitedPath] = useOnyx(ONYXKEYS.LAST_VISITED_PATH); useDebugShortcut(); @@ -81,7 +81,7 @@ function Expensify() { const bootsplashSpan = useRef(null); - const [initialUrl, setInitialUrl] = useState(undefined); + const [initialUrl, setInitialUrl] = useState(null); const {setIsAuthenticatedAtStartup} = useInitialURLActions(); useEffect(() => { @@ -302,7 +302,7 @@ function Expensify() { - {hasAttemptedToOpenPublicRoom && initialUrl !== undefined && ( + {hasAttemptedToOpenPublicRoom && ( ; [ONYXKEYS.TASK]: OnyxTypes.Task; [ONYXKEYS.CURRENCY_LIST]: OnyxTypes.CurrencyList; - [ONYXKEYS.RAM_ONLY_UPDATE_AVAILABLE]: boolean; + [ONYXKEYS.UPDATE_AVAILABLE]: boolean; [ONYXKEYS.SCREEN_SHARE_REQUEST]: OnyxTypes.ScreenShareRequest; [ONYXKEYS.COUNTRY_CODE]: number; [ONYXKEYS.COUNTRY]: string; @@ -1326,7 +1326,7 @@ type OnyxValuesMapping = { [ONYXKEYS.NVP_PRIVATE_BILLING_DISPUTE_PENDING]: number; [ONYXKEYS.NVP_PRIVATE_BILLING_STATUS]: OnyxTypes.BillingStatus; [ONYXKEYS.USER_WALLET]: OnyxTypes.UserWallet; - [ONYXKEYS.RAM_ONLY_WALLET_ONFIDO]: OnyxTypes.WalletOnfido; + [ONYXKEYS.WALLET_ONFIDO]: OnyxTypes.WalletOnfido; [ONYXKEYS.WALLET_ADDITIONAL_DETAILS]: OnyxTypes.WalletAdditionalDetails; [ONYXKEYS.WALLET_TERMS]: OnyxTypes.WalletTerms; [ONYXKEYS.BANK_ACCOUNT_LIST]: OnyxTypes.BankAccountList; @@ -1355,7 +1355,7 @@ type OnyxValuesMapping = { [ONYXKEYS.LAST_ACCESSED_WORKSPACE_POLICY_ID]: string; [ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT]: boolean; [ONYXKEYS.IS_BETA]: boolean; - [ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM]: boolean; + [ONYXKEYS.IS_CHECKING_PUBLIC_ROOM]: boolean; [ONYXKEYS.MY_DOMAIN_SECURITY_GROUPS]: Record; [ONYXKEYS.VERIFY_3DS_SUBSCRIPTION]: string; [ONYXKEYS.PREFERRED_THEME]: ValueOf; @@ -1372,10 +1372,10 @@ type OnyxValuesMapping = { [ONYXKEYS.ONBOARDING_POLICY_ID]: string; [ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID]: string; [ONYXKEYS.ONBOARDING_LAST_VISITED_PATH]: string; - [ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS]: boolean; + [ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: boolean; [ONYXKEYS.LAST_VISITED_PATH]: string | undefined; [ONYXKEYS.RECENTLY_USED_REPORT_FIELDS]: OnyxTypes.RecentlyUsedReportFields; - [ONYXKEYS.RAM_ONLY_UPDATE_REQUIRED]: boolean; + [ONYXKEYS.UPDATE_REQUIRED]: boolean; [ONYXKEYS.SUPPORTAL_PERMISSION_DENIED]: OnyxTypes.SupportalPermissionDenied | null; [ONYXKEYS.RESET_REQUIRED]: boolean; [ONYXKEYS.PLAID_CURRENT_EVENT]: string; diff --git a/src/components/BaseVacationDelegateSelectionComponent.tsx b/src/components/BaseVacationDelegateSelectionComponent.tsx index 937dbbff73291..f95dc2420c5a8 100644 --- a/src/components/BaseVacationDelegateSelectionComponent.tsx +++ b/src/components/BaseVacationDelegateSelectionComponent.tsx @@ -54,7 +54,7 @@ function BaseVacationDelegateSelectionComponent({ const styles = useThemeStyles(); const icons = useMemoizedLazyExpensifyIcons(['FallbackAvatar']); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const currentVacationDelegate = vacationDelegate?.delegate ?? ''; const delegatePersonalDetails = getPersonalDetailByEmail(currentVacationDelegate); diff --git a/src/components/Search/FilterDropdowns/UserSelectPopup.tsx b/src/components/Search/FilterDropdowns/UserSelectPopup.tsx index 22d795924f306..86594fbc3beeb 100644 --- a/src/components/Search/FilterDropdowns/UserSelectPopup.tsx +++ b/src/components/Search/FilterDropdowns/UserSelectPopup.tsx @@ -54,7 +54,7 @@ function UserSelectPopup({value, closeOverlay, onChange, isSearchable}: UserSele const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST); const [searchTerm, setSearchTerm] = useState(''); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const getInitialSelectedIDs = useCallback(() => { return value.reduce>((acc, id) => { diff --git a/src/components/Search/SearchFiltersChatsSelector.tsx b/src/components/Search/SearchFiltersChatsSelector.tsx index b4d8222eae1fb..34b532b1b58b2 100644 --- a/src/components/Search/SearchFiltersChatsSelector.tsx +++ b/src/components/Search/SearchFiltersChatsSelector.tsx @@ -57,7 +57,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen const currentUserAccountID = currentUserPersonalDetails.accountID; const currentUserEmail = currentUserPersonalDetails.email ?? ''; - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const reportAttributesDerived = useReportAttributes(); const [selectedReportIDs, setSelectedReportIDs] = useState(initialReportIDs); const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(''); diff --git a/src/components/Search/SearchFiltersParticipantsSelector.tsx b/src/components/Search/SearchFiltersParticipantsSelector.tsx index 6726c8f8a4bd3..9458f6b0cedea 100644 --- a/src/components/Search/SearchFiltersParticipantsSelector.tsx +++ b/src/components/Search/SearchFiltersParticipantsSelector.tsx @@ -83,7 +83,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate, const {options, areOptionsInitialized} = useOptionsList({ shouldInitialize: didScreenTransitionEnd, }); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const reportAttributesDerived = useReportAttributes(); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST); diff --git a/src/components/Search/SearchRouter/SearchRouter.tsx b/src/components/Search/SearchRouter/SearchRouter.tsx index 15f11a7806a92..787bd0bf5520b 100644 --- a/src/components/Search/SearchRouter/SearchRouter.tsx +++ b/src/components/Search/SearchRouter/SearchRouter.tsx @@ -62,7 +62,7 @@ function SearchRouter({onRouterClose, shouldHideInputCaret, isSearchRouterDispla const {setShouldResetSearchQuery} = useSearchActionsContext(); const currentUserPersonalDetails = useCurrentUserPersonalDetails(); const currentUserAccountID = currentUserPersonalDetails.accountID; - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); const personalDetails = usePersonalDetails(); diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts index 5b2da85e7f85d..de84e0220b6ed 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -121,7 +121,7 @@ Onyx.connectWithoutView({ const KEYS_TO_PRESERVE: OnyxKey[] = [ ONYXKEYS.ACCOUNT, - ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, + ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, ONYXKEYS.IS_LOADING_APP, ONYXKEYS.IS_SIDEBAR_LOADED, ONYXKEYS.MODAL, diff --git a/src/libs/actions/AppUpdate/index.ts b/src/libs/actions/AppUpdate/index.ts index 0c4f88d2dde2a..69c80a0898315 100644 --- a/src/libs/actions/AppUpdate/index.ts +++ b/src/libs/actions/AppUpdate/index.ts @@ -3,7 +3,7 @@ import ONYXKEYS from '@src/ONYXKEYS'; import updateApp from './updateApp'; function triggerUpdateAvailable() { - Onyx.set(ONYXKEYS.RAM_ONLY_UPDATE_AVAILABLE, true); + Onyx.set(ONYXKEYS.UPDATE_AVAILABLE, true); } function setIsAppInBeta(isBeta: boolean) { diff --git a/src/libs/actions/QueuedOnyxUpdates.ts b/src/libs/actions/QueuedOnyxUpdates.ts index cbb735e4dc309..be2a1480ccec1 100644 --- a/src/libs/actions/QueuedOnyxUpdates.ts +++ b/src/libs/actions/QueuedOnyxUpdates.ts @@ -45,7 +45,7 @@ function flushQueue(): Promise { ONYXKEYS.CREDENTIALS, ONYXKEYS.IS_SIDEBAR_LOADED, ONYXKEYS.ACCOUNT, - ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, + ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, ONYXKEYS.MODAL, ONYXKEYS.NETWORK, ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT, diff --git a/src/libs/actions/Report/index.ts b/src/libs/actions/Report/index.ts index 31d47f7dd603e..e60ebb5bebb82 100644 --- a/src/libs/actions/Report/index.ts +++ b/src/libs/actions/Report/index.ts @@ -1403,7 +1403,7 @@ function openReport(params: OpenReportActionParams) { }); } - const finallyData: Array> = []; + const finallyData: Array> = []; const parameters: OpenReportParams = { reportID, @@ -1670,7 +1670,7 @@ function openReport(params: OpenReportActionParams) { if (isFromDeepLink) { finallyData.push({ onyxMethod: Onyx.METHOD.SET, - key: ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, + key: ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, value: false, }); @@ -4233,7 +4233,7 @@ function toggleEmojiReaction( } function doneCheckingPublicRoom() { - Onyx.set(ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, false); + Onyx.set(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, false); } function navigateToMostRecentReport(currentReport: OnyxEntry, conciergeReportID: string | undefined, currentUserAccountID: number, introSelected: OnyxEntry) { @@ -5066,22 +5066,22 @@ function savePrivateNotesDraft(reportID: string, note: string) { function searchForReports(isOffline: boolean, searchInput: string, policyID?: string, isUserSearch = false) { // We do not try to make this request while offline because it sets a loading indicator optimistically if (isOffline) { - Onyx.set(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, false); + Onyx.set(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, false); return; } - const successData: Array> = [ + const successData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, + key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS, value: false, }, ]; - const failureData: Array> = [ + const failureData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, + key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS, value: false, }, ]; @@ -5105,14 +5105,14 @@ function performServerSearch(searchInput: string, policyID?: string, isUserSearc // We are not getting isOffline from components as useEffect change will re-trigger the search on network change const isOffline = NetworkStore.isOffline(); if (isOffline || !searchInput.trim().length) { - Onyx.set(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, false); + Onyx.set(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, false); return; } // Why not set this in optimistic data? It won't run until the API request happens and while the API request is debounced // we want to show the loading state right away. Otherwise, we will see a flashing UI where the client options are sorted and // tell the user there are no options, then we start searching, and tell them there are no options again. - Onyx.set(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, true); + Onyx.set(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, true); searchForReports(isOffline, searchInput, policyID, isUserSearch); } diff --git a/src/libs/actions/UpdateRequired.ts b/src/libs/actions/UpdateRequired.ts index 50573f62da242..078bcc41fd714 100644 --- a/src/libs/actions/UpdateRequired.ts +++ b/src/libs/actions/UpdateRequired.ts @@ -2,7 +2,7 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '@src/ONYXKEYS'; function alertUser() { - Onyx.set(ONYXKEYS.RAM_ONLY_UPDATE_REQUIRED, true); + Onyx.set(ONYXKEYS.UPDATE_REQUIRED, true); } export { diff --git a/src/libs/actions/Wallet.ts b/src/libs/actions/Wallet.ts index 5b15531bcd3bd..d19bfb759688b 100644 --- a/src/libs/actions/Wallet.ts +++ b/src/libs/actions/Wallet.ts @@ -23,21 +23,21 @@ type WalletQuestionAnswer = { * identity check. Note: This happens in Web-Secure when we call Activate_Wallet during the OnfidoStep. */ function openOnfidoFlow() { - const optimisticData: Array> = [ + const optimisticData: Array> = [ { // Use Onyx.set() since we are resetting the Onfido flow completely. onyxMethod: Onyx.METHOD.SET, - key: ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, + key: ONYXKEYS.WALLET_ONFIDO, value: { isLoading: true, }, }, ]; - const finallyData: Array> = [ + const finallyData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, + key: ONYXKEYS.WALLET_ONFIDO, value: { isLoading: false, }, @@ -97,10 +97,10 @@ function updatePersonalDetails(personalDetails: UpdatePersonalDetailsForWalletPa * API request to fetch the userWallet after we call VerifyIdentity */ function verifyIdentity(parameters: VerifyIdentityParams) { - const optimisticData: Array> = [ + const optimisticData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, + key: ONYXKEYS.WALLET_ONFIDO, value: { isLoading: true, errors: null, @@ -116,10 +116,10 @@ function verifyIdentity(parameters: VerifyIdentityParams) { }, ]; - const successData: Array> = [ + const successData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, + key: ONYXKEYS.WALLET_ONFIDO, value: { isLoading: false, errors: null, @@ -127,10 +127,10 @@ function verifyIdentity(parameters: VerifyIdentityParams) { }, ]; - const failureData: Array> = [ + const failureData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, + key: ONYXKEYS.WALLET_ONFIDO, value: { isLoading: false, hasAcceptedPrivacyPolicy: false, diff --git a/src/pages/EnablePayments/OnfidoStep.tsx b/src/pages/EnablePayments/OnfidoStep.tsx index 3a0e4c46a08db..94002641a84f2 100644 --- a/src/pages/EnablePayments/OnfidoStep.tsx +++ b/src/pages/EnablePayments/OnfidoStep.tsx @@ -15,7 +15,10 @@ import OnfidoPrivacy from './OnfidoPrivacy'; function OnfidoStep() { const {translate} = useLocalize(); - const [walletOnfidoData] = useOnyx(ONYXKEYS.RAM_ONLY_WALLET_ONFIDO); + const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, { + // Let's get a new onfido token each time the user hits this flow (as it should only be once) + initWithStoredValues: false, + }); const shouldShowOnfido = walletOnfidoData?.hasAcceptedPrivacyPolicy && !walletOnfidoData?.isLoading && !walletOnfidoData?.errors && walletOnfidoData?.sdkToken; diff --git a/src/pages/EnablePayments/VerifyIdentity/VerifyIdentity.tsx b/src/pages/EnablePayments/VerifyIdentity/VerifyIdentity.tsx index 6540e2305d2f2..b2b45a3a4625d 100644 --- a/src/pages/EnablePayments/VerifyIdentity/VerifyIdentity.tsx +++ b/src/pages/EnablePayments/VerifyIdentity/VerifyIdentity.tsx @@ -28,7 +28,7 @@ function VerifyIdentity() { const styles = useThemeStyles(); const {translate} = useLocalize(); const illustrations = useMemoizedLazyIllustrations(['ToddBehindCloud']); - const [walletOnfidoData] = useOnyx(ONYXKEYS.RAM_ONLY_WALLET_ONFIDO); + const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {initWithStoredValues: false}); const handleOnfidoSuccess = useCallback( (onfidoData: OnfidoData) => { diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index 50d3101c7f0d7..ddaf2206f10ea 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -241,7 +241,7 @@ function NewChatPage({ref}: NewChatPageProps) { const personalData = useCurrentUserPersonalDetails(); const currentUserAccountID = personalData.accountID; const {top} = useSafeAreaInsets(); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); const [reportAttributesDerivedFull] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES); diff --git a/src/pages/OnboardingWorkspaceInvite/BaseOnboardingWorkspaceInvite.tsx b/src/pages/OnboardingWorkspaceInvite/BaseOnboardingWorkspaceInvite.tsx index 676a3571cad15..4d868424c6fc5 100644 --- a/src/pages/OnboardingWorkspaceInvite/BaseOnboardingWorkspaceInvite.tsx +++ b/src/pages/OnboardingWorkspaceInvite/BaseOnboardingWorkspaceInvite.tsx @@ -54,7 +54,7 @@ function BaseOnboardingWorkspaceInvite({shouldUseNativeStyles}: BaseOnboardingWo // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth const {onboardingIsMediumOrLargerScreenWidth, isSmallScreenWidth} = useResponsiveLayout(); const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); const [account] = useOnyx(ONYXKEYS.ACCOUNT); diff --git a/src/pages/RoomInvitePage.tsx b/src/pages/RoomInvitePage.tsx index 4f71fe6af22dc..0c76ae5c5cdb5 100644 --- a/src/pages/RoomInvitePage.tsx +++ b/src/pages/RoomInvitePage.tsx @@ -72,7 +72,7 @@ function RoomInvitePage({ const currentUserEmail = currentUserPersonalDetails.email ?? ''; const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(userSearchPhrase ?? ''); const [selectedOptions, setSelectedOptions] = useState([]); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const isReportArchived = useReportIsArchived(report.reportID); const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING); diff --git a/src/pages/Share/ShareTab.tsx b/src/pages/Share/ShareTab.tsx index a14040db02b45..8039de13c85d3 100644 --- a/src/pages/Share/ShareTab.tsx +++ b/src/pages/Share/ShareTab.tsx @@ -64,7 +64,7 @@ function ShareTab({ref}: ShareTabProps) { const {options, areOptionsInitialized} = useOptionsList(); const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus(); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : ''; const shouldShowLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd; diff --git a/src/pages/domain/Admins/DomainAddAdminPage.tsx b/src/pages/domain/Admins/DomainAddAdminPage.tsx index 8af631497a511..4854fa1c26f03 100644 --- a/src/pages/domain/Admins/DomainAddAdminPage.tsx +++ b/src/pages/domain/Admins/DomainAddAdminPage.tsx @@ -36,7 +36,7 @@ function DomainAddAdminPage({route}: DomainAddAdminProps) { const {translate} = useLocalize(); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [domainEmail] = useOnyx(`${ONYXKEYS.COLLECTION.DOMAIN}${domainAccountID}`, { selector: domainEmailSelector, }); diff --git a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx index cc7acf5f35772..84b66d40a9216 100644 --- a/src/pages/iou/request/MoneyRequestAccountantSelector.tsx +++ b/src/pages/iou/request/MoneyRequestAccountantSelector.tsx @@ -59,7 +59,7 @@ function MoneyRequestAccountantSelector({onFinish, onAccountantSelected, iouType const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus(); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const [betas] = useOnyx(ONYXKEYS.BETAS); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const {options, areOptionsInitialized} = useOptionsList({ shouldInitialize: didScreenTransitionEnd, }); diff --git a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx index fdf959768012d..460225f0f055a 100644 --- a/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx +++ b/src/pages/iou/request/MoneyRequestAttendeeSelector.tsx @@ -68,7 +68,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID); const [recentAttendees] = useOnyx(ONYXKEYS.NVP_RECENT_ATTENDEES); const policy = usePolicy(activePolicyID); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const reportAttributesDerived = useReportAttributes(); const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : ''; const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST); diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index 7ca1ec19a904a..f10165931a13d 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -124,7 +124,7 @@ function MoneyRequestParticipantsSelector({ const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID}`]; const [ownerBillingGraceEndPeriod] = useOnyx(ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const currentUserPersonalDetails = useCurrentUserPersonalDetails(); const currentUserLogin = currentUserPersonalDetails.login; const currentUserEmail = currentUserPersonalDetails.email ?? ''; diff --git a/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx b/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx index 91a2a28464e0e..4adec3d12e248 100644 --- a/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx +++ b/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx @@ -19,7 +19,7 @@ import ROUTES from '@src/ROUTES'; function AddDelegatePage() { const {translate} = useLocalize(); const styles = useThemeStyles(); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [account] = useOnyx(ONYXKEYS.ACCOUNT); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const existingDelegates = diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index a83391e6f1c10..2781a7c10e6f3 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -41,7 +41,7 @@ function TaskAssigneeSelectorModal() { const backTo = route.params?.backTo; const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT); const [task] = useOnyx(ONYXKEYS.TASK); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const currentUserPersonalDetails = useCurrentUserPersonalDetails(); const currentUserEmail = currentUserPersonalDetails.email ?? ''; diff --git a/src/pages/tasks/TaskShareDestinationSelectorModal.tsx b/src/pages/tasks/TaskShareDestinationSelectorModal.tsx index 73dea1eb5b28c..197dc9c6c9570 100644 --- a/src/pages/tasks/TaskShareDestinationSelectorModal.tsx +++ b/src/pages/tasks/TaskShareDestinationSelectorModal.tsx @@ -52,7 +52,7 @@ function TaskShareDestinationSelectorModal() { const styles = useThemeStyles(); const {translate} = useLocalize(); const {isOffline} = useNetwork(); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const {searchTerm, debouncedSearchTerm, setSearchTerm, availableOptions, areOptionsInitialized, onListEndReached} = useSearchSelector({ diff --git a/src/pages/workspace/WorkspaceConfirmationOwnerSelectorPage.tsx b/src/pages/workspace/WorkspaceConfirmationOwnerSelectorPage.tsx index cc7888ec1ab9b..318a972beb1d5 100644 --- a/src/pages/workspace/WorkspaceConfirmationOwnerSelectorPage.tsx +++ b/src/pages/workspace/WorkspaceConfirmationOwnerSelectorPage.tsx @@ -56,7 +56,7 @@ function WorkspaceConfirmationOwnerSelectorPage() { const {login: currentUserLogin} = useCurrentUserPersonalDetails(); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [draftValues] = useOnyx(ONYXKEYS.FORMS.WORKSPACE_CONFIRMATION_FORM_DRAFT); const currentOwner = draftValues?.owner ?? currentUserLogin ?? ''; const ownerPersonalDetails = getPersonalDetailByEmail(currentOwner); diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index 52ec92301196d..f2462a634a5f9 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -44,7 +44,7 @@ function WorkspaceInvitePage({route, policy}: WorkspaceInvitePageProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE); const [invitedEmailsToAccountIDsDraft] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT}${route.params.policyID}`); const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); diff --git a/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx b/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx index 08562711e7bac..c102b4336a8a3 100644 --- a/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/AssigneeStep.tsx @@ -47,7 +47,7 @@ function AssigneeStep({route}: AssigneeStepProps) { const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); const [account] = useOnyx(ONYXKEYS.ACCOUNT); const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const ineligibleInvites = getIneligibleInvitees(policy?.employeeList); const excludedUsers: Record = {}; diff --git a/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx b/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx index 815e4e82228b8..89e667d6e28af 100644 --- a/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx +++ b/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx @@ -51,7 +51,7 @@ function AssigneeStep({policy, stepNames, startStepIndex, route}: AssigneeStepPr const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); const [account] = useOnyx(ONYXKEYS.ACCOUNT); const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false); - const [isSearchingForReports] = useOnyx(ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS); + const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false}); const ineligibleInvites = getIneligibleInvitees(policy?.employeeList); const excludedUsers: Record = {}; diff --git a/src/setup/index.ts b/src/setup/index.ts index 898d0c8d9b4f1..6f8aec7bb1e8f 100644 --- a/src/setup/index.ts +++ b/src/setup/index.ts @@ -60,13 +60,6 @@ export default function () { }, skippableCollectionMemberIDs: CONST.SKIPPABLE_COLLECTION_MEMBER_IDS, snapshotMergeKeys: ['pendingAction', 'pendingFields'], - ramOnlyKeys: [ - ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, - ONYXKEYS.RAM_ONLY_UPDATE_AVAILABLE, - ONYXKEYS.RAM_ONLY_UPDATE_REQUIRED, - ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS, - ONYXKEYS.RAM_ONLY_WALLET_ONFIDO, - ], }); // Must be imported after Onyx.init() and outside the React lifecycle so that push notification diff --git a/tests/perf-test/SearchRouter.perf-test.tsx b/tests/perf-test/SearchRouter.perf-test.tsx index ea02915723163..b9320a1087ed3 100644 --- a/tests/perf-test/SearchRouter.perf-test.tsx +++ b/tests/perf-test/SearchRouter.perf-test.tsx @@ -167,7 +167,7 @@ test('[SearchRouter] should render list with cached options', async () => { ...mockedReports, [ONYXKEYS.PERSONAL_DETAILS_LIST]: mockedPersonalDetails, [ONYXKEYS.BETAS]: mockedBetas, - [ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS]: true, + [ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: true, }), ) .then(() => measureRenders(, {scenario})); @@ -187,7 +187,7 @@ test('[SearchRouter] should react to text input changes', async () => { ...mockedReports, [ONYXKEYS.PERSONAL_DETAILS_LIST]: mockedPersonalDetails, [ONYXKEYS.BETAS]: mockedBetas, - [ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS]: true, + [ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: true, }), ) .then(() => measureRenders(, {scenario})); diff --git a/tests/ui/SessionTest.tsx b/tests/ui/SessionTest.tsx index ce508fb65cea6..7c2ea776385b6 100644 --- a/tests/ui/SessionTest.tsx +++ b/tests/ui/SessionTest.tsx @@ -154,13 +154,6 @@ describe('Deep linking', () => { await waitForBatchedUpdatesWithAct(); - // In production, RAM-only keys don't exist on a fresh app start because they're never persisted to storage. - // In tests, however, unmounting and remounting doesn't restart the JS process, - // so RAM-only keys retain their values from the previous mount. We need to manually - // remove them to simulate a real app restart. - await Onyx.set(ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, null); - await waitForBatchedUpdatesWithAct(); - const url = getInitialURL(); // User signs in automatically when the app is remounted because of the deep link. // This overrides the previous sign-in. diff --git a/tests/unit/APITest.ts b/tests/unit/APITest.ts index 1b011574482f1..8e81e4bfd42aa 100644 --- a/tests/unit/APITest.ts +++ b/tests/unit/APITest.ts @@ -874,8 +874,8 @@ describe('API.write() persistence guarantees', () => { // persisted-requests queue. This avoids spy-ordering issues that caused // false passes on CI. const updateMock = jest.spyOn(Onyx, 'update').mockImplementation((data) => { - // We use ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM as a sample key to identify the marker - const hasMarker = data.some((entry) => entry.key === ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM); + // We use ONYXKEYS.IS_CHECKING_PUBLIC_ROOM as a sample key to identify the marker + const hasMarker = data.some((entry) => entry.key === ONYXKEYS.IS_CHECKING_PUBLIC_ROOM); if (hasMarker) { optimisticDataApplied = true; // Note: getAll() checks the in-memory queue, not durable (disk) state. @@ -892,7 +892,7 @@ describe('API.write() persistence guarantees', () => { optimisticData: [ { onyxMethod: Onyx.METHOD.SET, - key: ONYXKEYS.RAM_ONLY_IS_CHECKING_PUBLIC_ROOM, + key: ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, value: true, }, ], diff --git a/tests/unit/SearchAutocompleteListTest.tsx b/tests/unit/SearchAutocompleteListTest.tsx index d9caa7dcba1bc..8889accc30bee 100644 --- a/tests/unit/SearchAutocompleteListTest.tsx +++ b/tests/unit/SearchAutocompleteListTest.tsx @@ -181,7 +181,7 @@ describe('SearchAutocompleteList', () => { ...mockedReports, [ONYXKEYS.PERSONAL_DETAILS_LIST]: mockedPersonalDetails, [ONYXKEYS.BETAS]: mockedBetas, - [ONYXKEYS.RAM_ONLY_IS_SEARCHING_FOR_REPORTS]: true, + [ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: true, [ONYXKEYS.RECENT_SEARCHES]: recentSearches, });