@@ -74,7 +74,6 @@ import type {OnyxData} from '@src/types/onyx/Request';
7474import type Nullable from '@src/types/utils/Nullable' ;
7575import SafeString from '@src/utils/SafeString' ;
7676import { setPersonalBankAccountContinueKYCOnSuccess } from './BankAccounts' ;
77- import { getCurrentUserEmail } from './IOU' ;
7877import { deleteMoneyRequest } from './IOU/DeleteMoneyRequest' ;
7978import { prepareRejectMoneyRequestData , rejectMoneyRequest } from './IOU/RejectMoneyRequest' ;
8079import type { RejectMoneyRequestData } from './IOU/RejectMoneyRequest' ;
@@ -993,6 +992,7 @@ function rejectMoneyRequestInBulk(
993992 policy : OnyxEntry < Policy > ,
994993 transactionIDs : string [ ] ,
995994 currentUserAccountIDParam : number ,
995+ currentUserLogin : string ,
996996 betas : OnyxEntry < Beta [ ] > ,
997997 hash ?: number ,
998998) {
@@ -1013,7 +1013,7 @@ function rejectMoneyRequestInBulk(
10131013 }
10141014 > = { } ;
10151015 for ( const transactionID of transactionIDs ) {
1016- const data = prepareRejectMoneyRequestData ( transactionID , reportID , comment , policy , currentUserAccountIDParam , getCurrentUserEmail ( ) , betas , undefined , true ) ;
1016+ const data = prepareRejectMoneyRequestData ( transactionID , reportID , comment , policy , currentUserAccountIDParam , currentUserLogin , betas , undefined , true ) ;
10171017 if ( data ) {
10181018 optimisticData . push ( ...data . optimisticData ) ;
10191019 successData . push ( ...data . successData ) ;
@@ -1048,6 +1048,7 @@ function rejectMoneyRequestsOnSearch(
10481048 allPolicies : OnyxCollection < Policy > ,
10491049 allReports : OnyxCollection < Report > ,
10501050 currentUserAccountIDParam : number ,
1051+ currentUserLogin : string ,
10511052 betas : OnyxEntry < Beta [ ] > ,
10521053) {
10531054 const transactionIDs = Object . keys ( selectedTransactions ) ;
@@ -1081,12 +1082,12 @@ function rejectMoneyRequestsOnSearch(
10811082 const policy = allPolicies ?. [ `${ ONYXKEYS . COLLECTION . POLICY } ${ report ?. policyID } ` ] ;
10821083 const isPolicyDelayedSubmissionEnabled = policy ? isDelayedSubmissionEnabled ( policy ) : false ;
10831084 if ( isPolicyDelayedSubmissionEnabled && areAllExpensesSelected ) {
1084- rejectMoneyRequestInBulk ( reportID , comment , policy , selectedTransactionIDs , currentUserAccountIDParam , betas , hash ) ;
1085+ rejectMoneyRequestInBulk ( reportID , comment , policy , selectedTransactionIDs , currentUserAccountIDParam , currentUserLogin , betas , hash ) ;
10851086 } else {
10861087 // Share a single destination ID across all rejections from the same source report
10871088 const sharedRejectedToReportID = generateReportID ( ) ;
10881089 for ( const transactionID of selectedTransactionIDs ) {
1089- rejectMoneyRequest ( transactionID , reportID , comment , policy , currentUserAccountIDParam , getCurrentUserEmail ( ) , betas , { sharedRejectedToReportID} ) ;
1090+ rejectMoneyRequest ( transactionID , reportID , comment , policy , currentUserAccountIDParam , currentUserLogin , betas , { sharedRejectedToReportID} ) ;
10901091 }
10911092 }
10921093 if ( isSingleReport && areAllExpensesSelected && ! isPolicyDelayedSubmissionEnabled ) {
0 commit comments