@@ -46,7 +46,7 @@ import type {Attendee, Participant} from '@src/types/onyx/IOU';
4646import type { CurrentUserPersonalDetails } from '@src/types/onyx/PersonalDetails' ;
4747import type { WaypointCollection } from '@src/types/onyx/Transaction' ;
4848import type { RequestMoneyInformation } from '.' ;
49- import { getAllReportActionsFromIOU , getAllReports , getAllTransactions , getAllTransactionViolations , getCurrentUserEmail , getMoneyRequestParticipantsFromReport , getUserAccountID } from '.' ;
49+ import { getAllReportActionsFromIOU , getAllReports , getAllTransactions , getAllTransactionViolations , getMoneyRequestParticipantsFromReport } from '.' ;
5050import { getCleanUpTransactionThreadReportOnyxData } from './DeleteMoneyRequest' ;
5151import type { PerDiemExpenseInformation } from './PerDiem' ;
5252import { submitPerDiemExpense } from './PerDiem' ;
@@ -966,6 +966,8 @@ type BulkDuplicateExpensesParams = {
966966 draftTransactionIDs : string [ ] ;
967967 betas : OnyxEntry < OnyxTypes . Beta [ ] > ;
968968 recentWaypoints : OnyxEntry < OnyxTypes . RecentWaypoint [ ] > ;
969+ currentUserLogin : string ;
970+ currentUserAccountID : number ;
969971} ;
970972
971973function bulkDuplicateExpenses ( {
@@ -987,6 +989,8 @@ function bulkDuplicateExpenses({
987989 draftTransactionIDs,
988990 betas,
989991 recentWaypoints,
992+ currentUserAccountID,
993+ currentUserLogin,
990994} : BulkDuplicateExpensesParams ) {
991995 const transactionsToDuplicate = transactionIDs . map ( ( id ) => allTransactions [ `${ ONYXKEYS . COLLECTION . TRANSACTION } ${ id } ` ] ) . filter ( ( t ) : t is OnyxTypes . Transaction => ! ! t ) ;
992996
@@ -1082,8 +1086,8 @@ function bulkDuplicateExpenses({
10821086 shouldDeferAutoSubmit,
10831087 existingIOUReport : optimisticIOUReport ,
10841088 optimisticReportPreviewActionID : currentReportPreviewActionID ,
1085- currentUserAccountID : getUserAccountID ( ) ,
1086- currentUserLogin : getCurrentUserEmail ( ) ,
1089+ currentUserAccountID,
1090+ currentUserLogin,
10871091 } ) ;
10881092
10891093 if ( result ?. iouReport ) {
@@ -1108,7 +1112,6 @@ type BulkDuplicateReportsParams = {
11081112 defaultExpensePolicy : OnyxEntry < OnyxTypes . Policy > ;
11091113 activePolicyExpenseChat : OnyxEntry < OnyxTypes . Report > ;
11101114 ownerPersonalDetails : CurrentUserPersonalDetails ;
1111- currentUserLogin : string ;
11121115 isASAPSubmitBetaEnabled : boolean ;
11131116 betas : OnyxEntry < OnyxTypes . Beta [ ] > ;
11141117 personalDetails : OnyxEntry < OnyxTypes . PersonalDetailsList > ;
@@ -1119,6 +1122,8 @@ type BulkDuplicateReportsParams = {
11191122 transactionViolations : OnyxCollection < OnyxTypes . TransactionViolation [ ] > ;
11201123 translate : LocalizedTranslate ;
11211124 recentWaypoints : OnyxEntry < OnyxTypes . RecentWaypoint [ ] > ;
1125+ currentUserLogin : string ;
1126+ currentUserAccountID : number ;
11221127} ;
11231128
11241129function bulkDuplicateReports ( {
@@ -1131,7 +1136,6 @@ function bulkDuplicateReports({
11311136 defaultExpensePolicy,
11321137 activePolicyExpenseChat,
11331138 ownerPersonalDetails,
1134- currentUserLogin,
11351139 isASAPSubmitBetaEnabled,
11361140 betas,
11371141 personalDetails,
@@ -1142,6 +1146,8 @@ function bulkDuplicateReports({
11421146 transactionViolations,
11431147 translate,
11441148 recentWaypoints,
1149+ currentUserLogin,
1150+ currentUserAccountID,
11451151} : BulkDuplicateReportsParams ) {
11461152 const allTransactionsMap = getAllTransactions ( ) ;
11471153 const transactionsByReportID = new Map < string , OnyxTypes . Transaction [ ] > ( ) ;
@@ -1215,8 +1221,8 @@ function bulkDuplicateReports({
12151221 translate,
12161222 recentWaypoints,
12171223 shouldPlaySound : false ,
1218- currentUserAccountID : getUserAccountID ( ) ,
1219- currentUserLogin : getCurrentUserEmail ( ) ,
1224+ currentUserAccountID,
1225+ currentUserLogin,
12201226 } ) ;
12211227 }
12221228
0 commit comments