@@ -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' ;
@@ -984,6 +983,7 @@ function rejectMoneyRequestInBulk(
984983 policy : OnyxEntry < Policy > ,
985984 transactionIDs : string [ ] ,
986985 currentUserAccountIDParam : number ,
986+ currentUserLogin : string ,
987987 betas : OnyxEntry < Beta [ ] > ,
988988 hash ?: number ,
989989) {
@@ -1004,7 +1004,7 @@ function rejectMoneyRequestInBulk(
10041004 }
10051005 > = { } ;
10061006 for ( const transactionID of transactionIDs ) {
1007- const data = prepareRejectMoneyRequestData ( transactionID , reportID , comment , policy , currentUserAccountIDParam , getCurrentUserEmail ( ) , betas , undefined , true ) ;
1007+ const data = prepareRejectMoneyRequestData ( transactionID , reportID , comment , policy , currentUserAccountIDParam , currentUserLogin , betas , undefined , true ) ;
10081008 if ( data ) {
10091009 optimisticData . push ( ...data . optimisticData ) ;
10101010 successData . push ( ...data . successData ) ;
@@ -1039,6 +1039,7 @@ function rejectMoneyRequestsOnSearch(
10391039 allPolicies : OnyxCollection < Policy > ,
10401040 allReports : OnyxCollection < Report > ,
10411041 currentUserAccountIDParam : number ,
1042+ currentUserLogin : string ,
10421043 betas : OnyxEntry < Beta [ ] > ,
10431044) {
10441045 const transactionIDs = Object . keys ( selectedTransactions ) ;
@@ -1072,12 +1073,12 @@ function rejectMoneyRequestsOnSearch(
10721073 const policy = allPolicies ?. [ `${ ONYXKEYS . COLLECTION . POLICY } ${ report ?. policyID } ` ] ;
10731074 const isPolicyDelayedSubmissionEnabled = policy ? isDelayedSubmissionEnabled ( policy ) : false ;
10741075 if ( isPolicyDelayedSubmissionEnabled && areAllExpensesSelected ) {
1075- rejectMoneyRequestInBulk ( reportID , comment , policy , selectedTransactionIDs , currentUserAccountIDParam , betas , hash ) ;
1076+ rejectMoneyRequestInBulk ( reportID , comment , policy , selectedTransactionIDs , currentUserAccountIDParam , currentUserLogin , betas , hash ) ;
10761077 } else {
10771078 // Share a single destination ID across all rejections from the same source report
10781079 const sharedRejectedToReportID = generateReportID ( ) ;
10791080 for ( const transactionID of selectedTransactionIDs ) {
1080- rejectMoneyRequest ( transactionID , reportID , comment , policy , currentUserAccountIDParam , getCurrentUserEmail ( ) , betas , { sharedRejectedToReportID} ) ;
1081+ rejectMoneyRequest ( transactionID , reportID , comment , policy , currentUserAccountIDParam , currentUserLogin , betas , { sharedRejectedToReportID} ) ;
10811082 }
10821083 }
10831084 if ( isSingleReport && areAllExpensesSelected && ! isPolicyDelayedSubmissionEnabled ) {
0 commit comments