@@ -7,6 +7,7 @@ import {bulkDuplicateExpenses, bulkDuplicateReports, duplicateExpenseTransaction
77import type { BulkDuplicateReportsParams , DuplicateReportParams } from '@libs/actions/IOU/Duplicate' ;
88import initOnyxDerivedValues from '@libs/actions/OnyxDerived' ;
99import { addComment , openReport } from '@libs/actions/Report' ;
10+ import type { MergeDuplicatesParams } from '@libs/API/parameters' ;
1011import { WRITE_COMMANDS } from '@libs/API/types' ;
1112import Navigation from '@libs/Navigation/Navigation' ;
1213import { getLoginsByAccountIDs } from '@libs/PersonalDetailsUtils' ;
@@ -186,7 +187,7 @@ describe('actions/Duplicate', () => {
186187 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ childReportID } ` , { } ) ;
187188 await waitForBatchedUpdates ( ) ;
188189
189- const mergeParams = {
190+ const mergeParams : MergeDuplicatesParams = {
190191 transactionID : mainTransactionID ,
191192 transactionIDList : duplicateTransactionIDs ,
192193 created : '2024-01-01 12:00:00' ,
@@ -203,7 +204,7 @@ describe('actions/Duplicate', () => {
203204 } ;
204205
205206 // When: Call mergeDuplicates
206- mergeDuplicates ( mergeParams ) ;
207+ mergeDuplicates ( { ... mergeParams , currentUserLogin : RORY_EMAIL , currentUserAccountID : RORY_ACCOUNT_ID } ) ;
207208 await waitForBatchedUpdates ( ) ;
208209
209210 // Then: Verify main transaction was updated
@@ -267,7 +268,7 @@ describe('actions/Duplicate', () => {
267268 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` , { } ) ;
268269 await waitForBatchedUpdates ( ) ;
269270
270- const mergeParams = {
271+ const mergeParams : MergeDuplicatesParams = {
271272 transactionID : mainTransactionID ,
272273 transactionIDList : [ ] ,
273274 created : '2024-01-01 12:00:00' ,
@@ -284,7 +285,7 @@ describe('actions/Duplicate', () => {
284285 } ;
285286
286287 // When: Call mergeDuplicates with empty duplicate list
287- mergeDuplicates ( mergeParams ) ;
288+ mergeDuplicates ( { ... mergeParams , currentUserLogin : RORY_EMAIL , currentUserAccountID : RORY_ACCOUNT_ID } ) ;
288289 await waitForBatchedUpdates ( ) ;
289290
290291 // Then: Verify main transaction was still updated
@@ -318,7 +319,7 @@ describe('actions/Duplicate', () => {
318319 await Onyx . set ( `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` , { } ) ;
319320 await waitForBatchedUpdates ( ) ;
320321
321- const mergeParams = {
322+ const mergeParams : MergeDuplicatesParams = {
322323 transactionID : mainTransactionID ,
323324 transactionIDList : duplicateTransactionIDs ,
324325 created : '2024-01-01 12:00:00' ,
@@ -335,7 +336,7 @@ describe('actions/Duplicate', () => {
335336 } ;
336337
337338 // When: Call mergeDuplicates without expense report
338- mergeDuplicates ( mergeParams ) ;
339+ mergeDuplicates ( { ... mergeParams , currentUserLogin : RORY_EMAIL , currentUserAccountID : RORY_ACCOUNT_ID } ) ;
339340 await waitForBatchedUpdates ( ) ;
340341
341342 // Then: Verify function completed without errors
@@ -519,7 +520,7 @@ describe('actions/Duplicate', () => {
519520
520521 await waitForBatchedUpdates ( ) ;
521522
522- const mergeParams = {
523+ const mergeParams : MergeDuplicatesParams = {
523524 transactionID : mainTransactionID ,
524525 transactionIDList : duplicateTransactionIDs ,
525526 created : '2024-01-01 12:00:00' ,
@@ -536,7 +537,7 @@ describe('actions/Duplicate', () => {
536537 } ;
537538
538539 // When: Call mergeDuplicates
539- mergeDuplicates ( mergeParams ) ;
540+ mergeDuplicates ( { ... mergeParams , currentUserLogin : RORY_EMAIL , currentUserAccountID : RORY_ACCOUNT_ID } ) ;
540541 await waitForBatchedUpdates ( ) ;
541542
542543 // Then we expect the reportPreview to update with new childVisibleActionCount
@@ -618,7 +619,7 @@ describe('actions/Duplicate', () => {
618619 } ) ;
619620 await waitForBatchedUpdates ( ) ;
620621
621- const mergeParams = {
622+ const mergeParams : MergeDuplicatesParams = {
622623 transactionID : mainTransactionID ,
623624 transactionIDList : duplicateTransactionIDs ,
624625 transactionThreadReportID : optimisticTransactionThreadReportID ,
@@ -636,7 +637,7 @@ describe('actions/Duplicate', () => {
636637 } ;
637638
638639 // When: Call mergeDuplicates with transactionThreadReportID
639- mergeDuplicates ( mergeParams ) ;
640+ mergeDuplicates ( { ... mergeParams , currentUserLogin : RORY_EMAIL , currentUserAccountID : RORY_ACCOUNT_ID } ) ;
640641 await waitForBatchedUpdates ( ) ;
641642
642643 // Then: Verify the optimistic transaction thread report was created
0 commit comments