diff --git a/src/hooks/useDeleteTransactions.ts b/src/hooks/useDeleteTransactions.ts index 3706144844f4c..f9d46afdf8c69 100644 --- a/src/hooks/useDeleteTransactions.ts +++ b/src/hooks/useDeleteTransactions.ts @@ -192,6 +192,7 @@ function useDeleteTransactions({report, reportActions, policy}: UseDeleteTransac selectedTransactionIDs: transactionIDs, allTransactionViolationsParam: transactionViolations, currentUserAccountID: currentUserPersonalDetails.accountID, + currentUserEmail: currentUserPersonalDetails.email ?? '', }); deletedTransactionIDs.push(transactionID); if (action.childReportID) { diff --git a/src/libs/actions/IOU/Duplicate.ts b/src/libs/actions/IOU/Duplicate.ts index c82992e02772f..b6d91637f6da6 100644 --- a/src/libs/actions/IOU/Duplicate.ts +++ b/src/libs/actions/IOU/Duplicate.ts @@ -79,6 +79,7 @@ function mergeDuplicates({transactionThreadReportID: optimisticTransactionThread const allTransactionViolations = getAllTransactionViolations(); const allReports = getAllReports(); const currentUserEmail = getCurrentUserEmail(); + const currentUserAccountID = getUserAccountID(); const originalSelectedTransaction = allTransactions[`${ONYXKEYS.COLLECTION.TRANSACTION}${params.transactionID}`]; @@ -221,6 +222,7 @@ function mergeDuplicates({transactionThreadReportID: optimisticTransactionThread reportAction: iouAction, updatedReportPreviewAction, shouldAddUpdatedReportPreviewActionToOnyxData: Number(index) === iouActionsToDelete.length - 1, + currentUserAccountID, }); cleanUpTransactionThreadReportsOptimisticData.push(...cleanUpTransactionThreadReportOnyxDataForIouAction.optimisticData); cleanUpTransactionThreadReportsSuccessData.push(...cleanUpTransactionThreadReportOnyxDataForIouAction.successData); diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index aec34197ebca5..4411401e9452d 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -847,6 +847,7 @@ type DeleteTrackExpenseParams = { isChatIOUReportArchived: boolean | undefined; allTransactionViolationsParam: OnyxCollection; currentUserAccountID: number; + currentUserEmail: string; }; type DeleteMoneyRequestFunctionParams = { @@ -862,6 +863,7 @@ type DeleteMoneyRequestFunctionParams = { selectedTransactionIDs?: string[]; allTransactionViolationsParam: OnyxCollection; currentUserAccountID: number; + currentUserEmail: string; }; type PayMoneyRequestFunctionParams = { @@ -982,13 +984,13 @@ Onyx.connect({ }, }); -let userAccountID = -1; -let currentUserEmail = ''; +let deprecatedUserAccountID = -1; +let deprecatedCurrentUserEmail = ''; Onyx.connect({ key: ONYXKEYS.SESSION, callback: (value) => { - currentUserEmail = value?.email ?? ''; - userAccountID = value?.accountID ?? CONST.DEFAULT_NUMBER_ID; + deprecatedCurrentUserEmail = value?.email ?? ''; + deprecatedUserAccountID = value?.accountID ?? CONST.DEFAULT_NUMBER_ID; }, }); @@ -996,7 +998,7 @@ let deprecatedCurrentUserPersonalDetails: OnyxEntry; Onyx.connect({ key: ONYXKEYS.PERSONAL_DETAILS_LIST, callback: (value) => { - deprecatedCurrentUserPersonalDetails = value?.[userAccountID] ?? undefined; + deprecatedCurrentUserPersonalDetails = value?.[deprecatedUserAccountID] ?? undefined; }, }); @@ -1046,11 +1048,11 @@ function getAllReportActionsFromIOU(): OnyxCollection { } function getCurrentUserEmail(): string { - return currentUserEmail; + return deprecatedCurrentUserEmail; } function getUserAccountID(): number { - return userAccountID; + return deprecatedUserAccountID; } /** @@ -1834,8 +1836,8 @@ function buildOnyxDataForTestDriveIOU( reportActionID: testDriveIOUParams.iouOptimisticParams.action.reportActionID, }); // eslint-disable-next-line @typescript-eslint/no-deprecated - const text = Localize.translateLocal('testDrive.employeeInviteMessage', personalDetailsList?.[userAccountID]?.firstName ?? ''); - const textComment = buildOptimisticAddCommentReportAction({text, actorAccountID: userAccountID, reportActionID: testDriveIOUParams.testDriveCommentReportActionID}); + const text = Localize.translateLocal('testDrive.employeeInviteMessage', personalDetailsList?.[deprecatedUserAccountID]?.firstName ?? ''); + const textComment = buildOptimisticAddCommentReportAction({text, actorAccountID: deprecatedUserAccountID, reportActionID: testDriveIOUParams.testDriveCommentReportActionID}); textComment.reportAction.created = DateUtils.subtractMillisecondsFromDateTime(testDriveIOUParams.iouOptimisticParams.createdAction.created, 1); optimisticData.push( @@ -3072,6 +3074,7 @@ function getDeleteTrackExpenseInformation( const cleanUpTransactionThreadReportOnyxData = getCleanUpTransactionThreadReportOnyxData({ transactionThreadID, shouldDeleteTransactionThread, + currentUserAccountID: deprecatedUserAccountID, }); optimisticData.push(...cleanUpTransactionThreadReportOnyxData.optimisticData); @@ -3245,7 +3248,7 @@ function getMoneyRequestInformation(moneyRequestInformation: MoneyRequestInforma personalDetails, betas, } = moneyRequestInformation; - const {payeeAccountID = userAccountID, payeeEmail = currentUserEmail, participant} = participantParams; + const {payeeAccountID = deprecatedUserAccountID, payeeEmail = deprecatedCurrentUserEmail, participant} = participantParams; const {policy, policyCategories, policyTagList, policyRecentlyUsedCategories, policyRecentlyUsedTags} = policyParams; const { attendees, @@ -3680,7 +3683,7 @@ function getTrackExpenseInformation(params: GetTrackExpenseInformationParams): T betas, isSelfTourViewed, } = params; - const {payeeAccountID = userAccountID, payeeEmail = currentUserEmail, participant} = participantParams; + const {payeeAccountID = deprecatedUserAccountID, payeeEmail = deprecatedCurrentUserEmail, participant} = participantParams; const {policy} = policyParams; const { comment, @@ -3726,7 +3729,7 @@ function getTrackExpenseInformation(params: GetTrackExpenseInformationParams): T if (!chatReport) { const currentTime = DateUtils.getDBTime(); const selfDMReport = buildOptimisticSelfDMReport(currentTime); - const selfDMCreatedReportAction = buildOptimisticCreatedReportAction(currentUserEmail ?? '', currentTime); + const selfDMCreatedReportAction = buildOptimisticCreatedReportAction(deprecatedCurrentUserEmail ?? '', currentTime); optimisticReportID = selfDMReport.reportID; optimisticReportActionID = selfDMCreatedReportAction.reportActionID; chatReport = selfDMReport; @@ -5973,7 +5976,7 @@ function convertBulkTrackedExpensesToIOU({ return; } - const participantAccountIDs = getReportRecipientAccountIDs(iouReport, userAccountID); + const participantAccountIDs = getReportRecipientAccountIDs(iouReport, deprecatedUserAccountID); const payerAccountID = participantAccountIDs.at(0); if (!payerAccountID) { @@ -6029,8 +6032,8 @@ function convertBulkTrackedExpensesToIOU({ } const participantParams = { - payeeAccountID: userAccountID, - payeeEmail: currentUserEmail, + payeeAccountID: deprecatedUserAccountID, + payeeEmail: deprecatedCurrentUserEmail, participant: { accountID: payerAccountID, login: payerEmail, @@ -6181,7 +6184,7 @@ function categorizeTrackedExpense(trackedExpenseParams: TrackedExpenseParams) { // If a draft policy was used, then the CategorizeTrackedExpense command will create a real one // so let's track that conversion here if (isDraftPolicy) { - GoogleTagManager.publishEvent(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED, userAccountID); + GoogleTagManager.publishEvent(CONST.ANALYTICS.EVENT.WORKSPACE_CREATED, deprecatedUserAccountID); } } @@ -7522,7 +7525,7 @@ function createSplitsAndOnyxData({ personalDetailListAction: oneOnOnePersonalDetailListAction, }, currentUserAccountIDParam: currentUserAccountID, - currentUserEmailParam: currentUserEmail, + currentUserEmailParam: deprecatedCurrentUserEmail, hasViolations, quickAction, personalDetails, @@ -7736,8 +7739,8 @@ function createDistanceRequest(distanceRequestInformation: CreateDistanceRequest moneyRequestReportID, participantParams: { participant, - payeeAccountID: userAccountID, - payeeEmail: currentUserEmail, + payeeAccountID: deprecatedUserAccountID, + payeeEmail: deprecatedCurrentUserEmail, }, policyParams: { policy, @@ -8413,6 +8416,7 @@ function getCleanUpTransactionThreadReportOnyxData({ isChatIOUReportArchived, updatedReportPreviewAction, shouldAddUpdatedReportPreviewActionToOnyxData = true, + currentUserAccountID, }: { transactionThreadID?: string; shouldDeleteTransactionThread: boolean; @@ -8420,6 +8424,7 @@ function getCleanUpTransactionThreadReportOnyxData({ isChatIOUReportArchived?: boolean; updatedReportPreviewAction?: ReportAction; shouldAddUpdatedReportPreviewActionToOnyxData?: boolean; + currentUserAccountID: number; }) { const optimisticData: Array> = []; const successData: Array> = []; @@ -8444,7 +8449,7 @@ function getCleanUpTransactionThreadReportOnyxData({ stateNum: CONST.REPORT.STATE_NUM.APPROVED, statusNum: CONST.REPORT.STATUS_NUM.CLOSED, participants: { - [userAccountID]: { + [currentUserAccountID]: { notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, }, }, @@ -8566,6 +8571,7 @@ function deleteMoneyRequest({ selectedTransactionIDs, allTransactionViolationsParam, currentUserAccountID, + currentUserEmail, }: DeleteMoneyRequestFunctionParams) { if (!transactionID) { return; @@ -8686,7 +8692,13 @@ function deleteMoneyRequest({ }); } - const cleanUpTransactionThreadReportOnyxData = getCleanUpTransactionThreadReportOnyxData({shouldDeleteTransactionThread, transactionThreadID, reportAction, isChatIOUReportArchived}); + const cleanUpTransactionThreadReportOnyxData = getCleanUpTransactionThreadReportOnyxData({ + shouldDeleteTransactionThread, + transactionThreadID, + reportAction, + isChatIOUReportArchived, + currentUserAccountID, + }); optimisticData.push(...cleanUpTransactionThreadReportOnyxData.optimisticData); const successData: Array> = [ @@ -8845,6 +8857,7 @@ function deleteTrackExpense({ isChatIOUReportArchived, allTransactionViolationsParam, currentUserAccountID, + currentUserEmail, }: DeleteTrackExpenseParams) { if (!chatReportID || !transactionID) { return; @@ -8874,6 +8887,7 @@ function deleteTrackExpense({ isSingleTransactionView, allTransactionViolationsParam, currentUserAccountID, + currentUserEmail, }); return urlToNavigateBack; } @@ -9399,7 +9413,7 @@ function getPayMoneyRequestParams({ successData: policySuccessData, params, } = buildPolicyData({ - policyOwnerEmail: currentUserEmail, + policyOwnerEmail: deprecatedCurrentUserEmail, makeMeAdmin: true, policyID: payerPolicyID, currentUserAccountIDParam: currentUserAccountIDParam ?? CONST.DEFAULT_NUMBER_ID, @@ -9473,7 +9487,7 @@ function getPayMoneyRequestParams({ const optimisticChatReport = { ...chatReport, lastReadTime: DateUtils.getDBTime(), - hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID, currentUserEmail, currentUserAccountIDParam, allTransactionViolations, undefined), + hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID, deprecatedCurrentUserEmail, currentUserAccountIDParam, allTransactionViolations, undefined), iouReportID: null, lastMessageText: getReportActionText(optimisticIOUReportAction), lastMessageHtml: getReportActionHtml(optimisticIOUReportAction), @@ -9721,7 +9735,7 @@ function canApproveIOU( } const managerID = iouReport?.managerID ?? CONST.DEFAULT_NUMBER_ID; - const isCurrentUserManager = managerID === userAccountID; + const isCurrentUserManager = managerID === deprecatedUserAccountID; const isOpenExpenseReport = isOpenExpenseReportReportUtils(iouReport); const isApproved = isReportApproved({report: iouReport}); const iouSettled = isSettled(iouReport); @@ -9781,12 +9795,12 @@ function canIOUBePaid( return false; } if (chatReport?.invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.INDIVIDUAL) { - return chatReport?.invoiceReceiver?.accountID === userAccountID; + return chatReport?.invoiceReceiver?.accountID === deprecatedUserAccountID; } return invoiceReceiverPolicy?.role === CONST.POLICY.ROLE.ADMIN; } - const isPayer = isPayerReportUtils(userAccountID, currentUserEmail, iouReport, bankAccountList, policy, onlyShowPayElsewhere); + const isPayer = isPayerReportUtils(deprecatedUserAccountID, deprecatedCurrentUserEmail, iouReport, bankAccountList, policy, onlyShowPayElsewhere); const {reimbursableSpend} = getMoneyRequestSpendBreakdown(iouReport); const isAutoReimbursable = policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_YES ? false : canBeAutoReimbursed(iouReport, policy); @@ -9880,8 +9894,8 @@ function getIOUReportActionWithBadge( policy, getReportTransactions(iouReport?.reportID), allTransactionViolations, - currentUserEmail, - userAccountID, + deprecatedCurrentUserEmail, + deprecatedUserAccountID, getAllReportActions(iouReport?.reportID), ); if (isWaitingSubmitFromCurrentUser) { @@ -11309,7 +11323,7 @@ function completePaymentOnboarding( return; } - const personalDetailsListValues = Object.values(getPersonalDetailsForAccountIDs(userAccountID ? [userAccountID] : [], personalDetailsList)); + const personalDetailsListValues = Object.values(getPersonalDetailsForAccountIDs(deprecatedUserAccountID ? [deprecatedUserAccountID] : [], personalDetailsList)); const personalDetails = personalDetailsListValues.at(0); let onboardingPurpose = introSelected?.choice; @@ -11936,7 +11950,7 @@ function shouldOptimisticallyUpdateSearch( return false; } - const suggestedSearches = getSuggestedSearches(userAccountID); + const suggestedSearches = getSuggestedSearches(deprecatedUserAccountID); const submitQueryJSON = suggestedSearches[CONST.SEARCH.SEARCH_KEYS.SUBMIT].searchQueryJSON; const approveQueryJSON = suggestedSearches[CONST.SEARCH.SEARCH_KEYS.APPROVE].searchQueryJSON; const unapprovedCashSimilarSearchHash = suggestedSearches[CONST.SEARCH.SEARCH_KEYS.UNAPPROVED_CASH].similarSearchHash; @@ -12458,7 +12472,7 @@ function prepareRejectMoneyRequestData( amount: transactionAmount, currency: getCurrency(transaction), comment, - payeeEmail: currentUserEmail, + payeeEmail: deprecatedCurrentUserEmail, participants: [{accountID: report?.ownerAccountID}], transactionID: transaction.transactionID, existingTransactionThreadReportID: childReportID, @@ -12720,7 +12734,7 @@ function prepareRejectMoneyRequestData( const shouldHaveOutstandingChildRequest = hasOutstandingChildRequest( policyExpenseChat, excludedReportID, - currentUserEmail, + deprecatedCurrentUserEmail, currentUserAccountIDParam, allTransactionViolations, undefined, @@ -12780,7 +12794,7 @@ function prepareRejectMoneyRequestData( type: CONST.VIOLATION_TYPES.WARNING, data: { comment: comment ?? '', - rejectedBy: currentUserEmail, + rejectedBy: deprecatedCurrentUserEmail, rejectedDate: DateUtils.getDBTime(), }, showInReview: true, diff --git a/src/libs/actions/MergeTransaction.ts b/src/libs/actions/MergeTransaction.ts index 0159bcb3cd564..6891f35fa083d 100644 --- a/src/libs/actions/MergeTransaction.ts +++ b/src/libs/actions/MergeTransaction.ts @@ -471,6 +471,7 @@ function mergeTransactionRequest({ transactionThreadID: sourceTransactionThreadReportID, shouldDeleteTransactionThread, reportAction: sourceIouAction, + currentUserAccountID: currentUserAccountIDParam, }); optimisticSourceReportActionData.push(...cleanUpSourceTransactionThreadReportOnyxData.optimisticData); successSourceReportActionData.push(...cleanUpSourceTransactionThreadReportOnyxData.successData); diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts index 1838aae73a576..1748f71fdd2e9 100644 --- a/src/libs/actions/Search.ts +++ b/src/libs/actions/Search.ts @@ -937,6 +937,7 @@ function bulkDeleteReports({ selectedTransactionIDs: batchTransactionIDsForReport.length > 0 ? batchTransactionIDsForReport : undefined, allTransactionViolationsParam: transactionsViolations, currentUserAccountID: currentUserAccountIDParam, + currentUserEmail: currentUserEmailParam, }); } diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index a3e94572702d3..e79d7568bd1a9 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -912,6 +912,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail isChatIOUReportArchived, allTransactionViolationsParam: allTransactionViolations, currentUserAccountID: currentUserPersonalDetails.accountID, + currentUserEmail: currentUserPersonalDetails.email ?? '', }); } else if (iouTransactionID) { deleteTransactions([iouTransactionID], duplicateTransactions, duplicateTransactionViolations, currentSearchHash, isSingleTransactionView); diff --git a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx index 349a77f4d4df7..1af93caf52327 100644 --- a/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx +++ b/src/pages/inbox/report/ContextMenu/PopoverReportActionContextMenu.tsx @@ -369,6 +369,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro isChatIOUReportArchived, allTransactionViolationsParam: allTransactionViolations, currentUserAccountID, + currentUserEmail: email ?? '', }); } else if (originalMessage?.IOUTransactionID) { deleteTransactions([originalMessage.IOUTransactionID], duplicateTransactions, duplicateTransactionViolations, currentSearchHash); diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index dd84a38cc8b15..0eba6538f6079 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -7721,6 +7721,7 @@ describe('actions/IOU', () => { isChatIOUReportArchived: true, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -7810,6 +7811,7 @@ describe('actions/IOU', () => { isChatIOUReportArchived: true, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -7892,6 +7894,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8002,6 +8005,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8149,6 +8153,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8261,6 +8266,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8446,6 +8452,7 @@ describe('actions/IOU', () => { isChatIOUReportArchived: undefined, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8559,6 +8566,7 @@ describe('actions/IOU', () => { isChatIOUReportArchived: undefined, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } await waitForBatchedUpdates(); @@ -8662,6 +8670,7 @@ describe('actions/IOU', () => { isSingleTransactionView: true, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } @@ -8719,6 +8728,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } // Then we expect to navigate to the chat report @@ -8882,6 +8892,7 @@ describe('actions/IOU', () => { chatReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); } @@ -9210,6 +9221,7 @@ describe('actions/IOU', () => { describe('bulk deleteMoneyRequest', () => { const TEST_USER_ACCOUNT_ID = 1; + const TEST_USER_LOGIN = 'test@email.com'; it('update IOU report total properly for bulk deletion of expenses', async () => { const expenseReport: Report = { @@ -9274,6 +9286,7 @@ describe('actions/IOU', () => { selectedTransactionIDs, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); deleteMoneyRequest({ transactionID: transaction2.transactionID, @@ -9286,6 +9299,7 @@ describe('actions/IOU', () => { selectedTransactionIDs, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); await waitForBatchedUpdates(); @@ -9307,6 +9321,7 @@ describe('actions/IOU', () => { describe('deleteMoneyRequest with allTransactionViolationsParam', () => { const TEST_USER_ACCOUNT_ID = 1; + const TEST_USER_LOGIN = 'test@email.com'; it('should pass transaction violations to hasOutstandingChildRequest correctly', async () => { // Given an expense report with a transaction const expenseReport: Report = { @@ -9361,6 +9376,7 @@ describe('actions/IOU', () => { chatReport: expenseReport, allTransactionViolationsParam: transactionViolations, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); await waitForBatchedUpdates(); @@ -9424,6 +9440,7 @@ describe('actions/IOU', () => { chatReport: expenseReport, allTransactionViolationsParam: {}, currentUserAccountID: TEST_USER_ACCOUNT_ID, + currentUserEmail: TEST_USER_LOGIN, }); await waitForBatchedUpdates();