Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44aa890
add ramOnlyKeys param to Onyx.init, remove initWithStoredValues
JKobrynski Feb 12, 2026
4436a4f
remove initWithStoredValues: true
JKobrynski Feb 12, 2026
8b95a3a
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Feb 13, 2026
fe16418
add onyx migration for ram-only keys
JKobrynski Feb 13, 2026
b58c765
revert accidental Mobile-Expensify submodule pointer change
JKobrynski Feb 14, 2026
6844562
fix canBeMissing for IS_SEARCHING_FOR_REPORTS to true
JKobrynski Feb 14, 2026
de91bc0
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Feb 16, 2026
d4c0ac6
fix typo in migration log message
JKobrynski Feb 16, 2026
626d598
address review comments
JKobrynski Feb 16, 2026
93bd301
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Feb 17, 2026
4a8d2dc
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 2, 2026
2ce3734
remove ram-only onyx migration
JKobrynski Mar 2, 2026
97a936f
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 2, 2026
d6f1594
Merge remote-tracking branch 'upstream/main' into JKobrynski/feat/800…
JKobrynski Mar 2, 2026
7370001
remove initWithStoredValues from remaining IS_SEARCHING_FOR_REPORTS
JKobrynski Mar 3, 2026
5666ab1
Merge branch 'main' into JKobrynski/feat/80091-migrate-keys-to-ram-on…
JKobrynski Mar 3, 2026
5f9fcbd
add RAM_ONLY_ prefix to RAM-only keys
JKobrynski Mar 3, 2026
e74b1a5
Merge remote-tracking branch 'upstream/main' into JKobrynski/feat/800…
JKobrynski Mar 3, 2026
01634ee
fix failing test, add explanation
JKobrynski Mar 4, 2026
bb51ecb
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 6, 2026
9bb37d2
fix race condition
JKobrynski Mar 9, 2026
c9a31c1
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 10, 2026
b705408
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 10, 2026
d2d2d67
apply fix suggested by reviewer
JKobrynski Mar 12, 2026
f68144f
handle rejected Linking.getInitialUrl, add timeout
JKobrynski Mar 12, 2026
be3f346
add a stale closure guard
JKobrynski Mar 12, 2026
1d287dd
add more documentation to the safety-net
JKobrynski Mar 12, 2026
4e9b00c
Merge remote-tracking branch 'origin/main' into JKobrynski/feat/80091…
JKobrynski Mar 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Expensify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ function Expensify() {
const [session, sessionMetadata] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: true});
const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE, {canBeMissing: true});
const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA, {canBeMissing: true});
const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {initWithStoredValues: false, canBeMissing: true});
const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {initWithStoredValues: false, canBeMissing: true});
const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {initWithStoredValues: false, canBeMissing: true});
const [isCheckingPublicRoom = true] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, {canBeMissing: true});
const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE, {canBeMissing: true});
const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED, {canBeMissing: true});
const [isSidebarLoaded] = useOnyx(ONYXKEYS.IS_SIDEBAR_LOADED, {canBeMissing: true});
const [screenShareRequest] = useOnyx(ONYXKEYS.SCREEN_SHARE_REQUEST, {canBeMissing: true});
const [lastVisitedPath] = useOnyx(ONYXKEYS.LAST_VISITED_PATH, {canBeMissing: true});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function UserSelectPopup({value, closeOverlay, onChange, isSearchable}: UserSele
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST, {canBeMissing: true});
const [searchTerm, setSearchTerm] = useState('');
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [draftComments] = useOnyx(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT, {canBeMissing: true});
const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {canBeMissing: true});
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true});
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/SearchFiltersChatsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function SearchFiltersChatsSelector({initialReportIDs, onFiltersUpdate, isScreen
const currentUserAccountID = currentUserPersonalDetails.accountID;
const currentUserEmail = currentUserPersonalDetails.email ?? '';

const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [reportAttributesDerived] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {canBeMissing: true, selector: reportsSelector});
const [selectedReportIDs, setSelectedReportIDs] = useState<string[]>(initialReportIDs);
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function SearchFiltersParticipantsSelector({initialAccountIDs, onFiltersUpdate,
const {options, areOptionsInitialized} = useOptionsList({
shouldInitialize: didScreenTransitionEnd,
});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: false, initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [reportAttributesDerived] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {canBeMissing: true, selector: reportsSelector});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST, {canBeMissing: true});
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/SearchRouter/SearchRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function SearchRouter({onRouterClose, shouldHideInputCaret, isSearchRouterDispla
const currentUserAccountID = currentUserPersonalDetails.accountID;
const [, recentSearchesMetadata] = useOnyx(ONYXKEYS.RECENT_SEARCHES, {canBeMissing: true});
const {areOptionsInitialized} = useOptionsList();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const isRecentSearchesDataLoaded = !isLoadingOnyxValue(recentSearchesMetadata);
const shouldShowList = isRecentSearchesDataLoaded && areOptionsInitialized;
const personalDetails = usePersonalDetails();
Expand Down
2 changes: 0 additions & 2 deletions src/libs/actions/Troubleshoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ function tryInitialize() {
*/
Onyx.connectWithoutView({
key: ONYXKEYS.SHOULD_RECORD_TROUBLESHOOT_DATA,
initWithStoredValues: true,
callback: (value) => {
shouldRecordTroubleshootData = value;
isRecordingLoaded = true;
Expand All @@ -182,7 +181,6 @@ Onyx.connectWithoutView({
*/
Onyx.connectWithoutView({
key: ONYXKEYS.TROUBLESHOOT_RECORDING_START_TIME,
initWithStoredValues: true,
callback: (value) => {
troubleshootRecordingStartTime = value;
isStartTimeLoaded = true;
Expand Down
3 changes: 2 additions & 1 deletion src/libs/migrateOnyx.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import CONST from '@src/CONST';
import Log from './Log';
import ConvertPolicyChatReportIDsToString from './migrations/ConvertPolicyChatReportIDsToString';
import RemoveRamOnlyKeysFromStorage from './migrations/RemoveRamOnlyKeysFromStorage';
import RenameEmojiSkinTone from './migrations/RenameEmojiSkinTone';
import {endSpan, getSpan, startSpan} from './telemetry/activeSpans';

Expand All @@ -16,7 +17,7 @@ export default function () {
});

// Add all migrations to an array so they are executed in order
const migrationPromises = [RenameEmojiSkinTone, ConvertPolicyChatReportIDsToString];
const migrationPromises = [RenameEmojiSkinTone, ConvertPolicyChatReportIDsToString, RemoveRamOnlyKeysFromStorage];

// Reduce all promises down to a single promise. All promises run in a linear fashion, waiting for the
// previous promise to finish before moving onto the next one.
Expand Down
53 changes: 53 additions & 0 deletions src/libs/migrations/RemoveRamOnlyKeysFromStorage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import Onyx from 'react-native-onyx';
import Log from '@libs/Log';
import type {OnyxValues} from '@src/ONYXKEYS';
import ONYXKEYS from '@src/ONYXKEYS';

export default function () {
const ramOnlyKeys = [ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, ONYXKEYS.UPDATE_AVAILABLE, ONYXKEYS.UPDATE_REQUIRED, ONYXKEYS.IS_SEARCHING_FOR_REPORTS, ONYXKEYS.WALLET_ONFIDO];
// Onyx.init is called before this function, so if we remove a RAM-only key from Onyx storage, it's initial value will be lost.
// We need to take initialKeyStates into account, so we can remove the newly migrated RAM-only key from storage, and then restore its initial value.
const initialKeyStates: Partial<OnyxValues> = {};

// Map each key to a migration promise
const migrationPromises = ramOnlyKeys.map((key) => {
return new Promise<void>((resolve) => {
const connection = Onyx.connectWithoutView({
key,
callback: (value) => {
Onyx.disconnect(connection);

// Skip if empty or already migrated
if (value === undefined || value === null) {
Log.info(`[Migrate Onyx] Skipping ${key}: No action needed`);
return resolve();
}

Log.info(`[Migrate Onyx] Removing RAM-only key: ${key} from storage`);

// If a key is converted to RAM-only, its previous value might still be in storage.
// We set the value of that key to null, so it's removed from storage.
// eslint-disable-next-line rulesdir/prefer-actions-set-data
Onyx.merge(key, null).then(() => {
Log.info(`[Migrate Onyx] RAM-only key: ${key} removed from storage`);
resolve();
});

// Restore initial key state if necessary
if (initialKeyStates[key]) {
// eslint-disable-next-line rulesdir/prefer-actions-set-data
Onyx.merge(key, initialKeyStates[key]).then(() => {
Log.info(`[Migrate Onyx] RAM-only key: ${key} initial value restored`);
resolve();
});
}
},
});
});
});

// Wait for all individual migrations to settle
return Promise.all(migrationPromises).then(() => {
Log.info('[Migrate Onyx] All RAM-only keys migrated successfully.');
});
}
2 changes: 0 additions & 2 deletions src/pages/EnablePayments/OnfidoStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ function OnfidoStep() {
const {translate} = useLocalize();
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {
canBeMissing: true,
// 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function VerifyIdentity() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const illustrations = useMemoizedLazyIllustrations(['ToddBehindCloud']);
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {canBeMissing: true, initWithStoredValues: false});
const [walletOnfidoData] = useOnyx(ONYXKEYS.WALLET_ONFIDO, {canBeMissing: true});

const handleOnfidoSuccess = useCallback(
(onfidoData: OnfidoData) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/NewChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function NewChatPage({ref}: NewChatPageProps) {
const personalData = useCurrentUserPersonalDetails();
const currentUserAccountID = personalData.accountID;
const {top} = useSafeAreaInsets();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [reportAttributesDerivedFull] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {canBeMissing: true});
const reportAttributesDerived = reportAttributesDerivedFull?.reports;
const selectionListRef = useRef<SelectionListHandle | null>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true, initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {canBeMissing: false});
const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RoomInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function RoomInvitePage({
const currentUserEmail = currentUserPersonalDetails.email ?? '';
const [searchTerm, debouncedSearchTerm, setSearchTerm] = useDebouncedState(userSearchPhrase ?? '');
const [selectedOptions, setSelectedOptions] = useState<OptionData[]>([]);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const isReportArchived = useReportIsArchived(report.reportID);
const [nvpDismissedProductTraining] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, {canBeMissing: true});

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Share/ShareTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function ShareTab({ref}: ShareTabProps) {

const {options, areOptionsInitialized} = useOptionsList();
const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});

const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : '';
const showLoadingPlaceholder = useMemo(() => !areOptionsInitialized || !didScreenTransitionEnd, [areOptionsInitialized, didScreenTransitionEnd]);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/domain/Admins/DomainAddAdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function DomainAddAdminPage({route}: DomainAddAdminProps) {
const {translate} = useLocalize();

const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [domainEmail] = useOnyx(`${ONYXKEYS.COLLECTION.DOMAIN}${domainAccountID}`, {
canBeMissing: true,
selector: domainEmailSelector,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/MoneyRequestAccountantSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function MoneyRequestAccountantSelector({onFinish, onAccountantSelected, iouType
const {didScreenTransitionEnd} = useScreenWrapperTransitionStatus();
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [betas] = useOnyx(ONYXKEYS.BETAS, {canBeMissing: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const {options, areOptionsInitialized} = useOptionsList({
shouldInitialize: didScreenTransitionEnd,
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/MoneyRequestAttendeeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function MoneyRequestAttendeeSelector({attendees = [], onFinish, onAttendeesAdde
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true});
const [recentAttendees] = useOnyx(ONYXKEYS.NVP_RECENT_ATTENDEES, {canBeMissing: true});
const policy = usePolicy(activePolicyID);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [reportAttributesDerived] = useOnyx(ONYXKEYS.DERIVED.REPORT_ATTRIBUTES, {canBeMissing: true, selector: reportsSelector});
const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : '';
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST, {canBeMissing: true});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function MoneyRequestParticipantsSelector({
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID, {canBeMissing: true});
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true});
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID}`];
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true, initWithStoredValues: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const currentUserLogin = currentUserPersonalDetails.login;
const currentUserEmail = currentUserPersonalDetails.email ?? '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Sections = Array<Section<SearchOptionData>>;
function BaseShareLogList({onAttachLogToReport}: BaseShareLogListProps) {
const {isOffline} = useNetwork();
const {translate} = useLocalize();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});

const {searchTerm, debouncedSearchTerm, setSearchTerm, availableOptions, areOptionsInitialized} = useSearchSelector({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function VacationDelegatePage() {
const {login: currentUserLogin} = useCurrentUserPersonalDetails();
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});

const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [vacationDelegate] = useOnyx(ONYXKEYS.NVP_PRIVATE_VACATION_DELEGATE, {canBeMissing: true});
const currentVacationDelegate = vacationDelegate?.delegate ?? '';
const delegatePersonalDetails = getPersonalDetailByEmail(currentVacationDelegate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ROUTES from '@src/ROUTES';
function AddDelegatePage() {
const {translate} = useLocalize();
const styles = useThemeStyles();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const existingDelegates =
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/TaskAssigneeSelectorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function TaskAssigneeSelectorModal() {
const backTo = route.params?.backTo;
const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: false});
const [task] = useOnyx(ONYXKEYS.TASK, {canBeMissing: false});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
const currentUserEmail = currentUserPersonalDetails.email ?? '';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/TaskShareDestinationSelectorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function TaskShareDestinationSelectorModal() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isOffline} = useNetwork();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});

const {searchTerm, debouncedSearchTerm, setSearchTerm, availableOptions, areOptionsInitialized, onListEndReached} = useSearchSelector({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function WorkspaceInvitePage({route, policy}: WorkspaceInvitePageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const [didScreenTransitionEnd, setDidScreenTransitionEnd] = useState(false);
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false, canBeMissing: true});
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {canBeMissing: true});
const [countryCode = CONST.DEFAULT_COUNTRY_CODE] = useOnyx(ONYXKEYS.COUNTRY_CODE, {canBeMissing: false});
const [invitedEmailsToAccountIDsDraft] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT}${route.params.policyID}`, {canBeMissing: true});
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST, {canBeMissing: false});
Expand Down
Loading
Loading