11import Onyx from 'react-native-onyx' ;
2- import type { NullishDeep , OnyxEntry } from 'react-native-onyx' ;
32import type { ValueOf } from 'type-fest' ;
43import type { IOUAction , IOUType } from '@src/CONST' ;
54import CONST from '@src/CONST' ;
65import ONYXKEYS from '@src/ONYXKEYS' ;
76import ROUTES from '@src/ROUTES' ;
8- import type { OnyxInputOrEntry , PersonalDetails , Report , Transaction } from '@src/types/onyx' ;
7+ import type { OnyxInputOrEntry , PersonalDetails , Report } from '@src/types/onyx' ;
98import type { Attendee } from '@src/types/onyx/IOU' ;
10- import { getMoneyRequestParticipantsFromReport } from './actions/IOU' ;
119import type { IOURequestType } from './actions/IOU' ;
1210import { getCurrencyUnit } from './CurrencyUtils' ;
1311import DateUtils from './DateUtils' ;
@@ -218,19 +216,6 @@ function shouldStartLocationPermissionFlow() {
218216 ) ;
219217}
220218
221- function setMultipleMoneyRequestParticipantsFromReport ( transactionIDs : string [ ] , reportValue : OnyxEntry < Report > ) {
222- const participants = getMoneyRequestParticipantsFromReport ( reportValue ) ;
223- const updatedTransactions : Record < `${typeof ONYXKEYS . COLLECTION . TRANSACTION_DRAFT } ${string } `, NullishDeep < Transaction > > = { } ;
224- transactionIDs . forEach ( ( transactionID ) => {
225- updatedTransactions [ `${ ONYXKEYS . COLLECTION . TRANSACTION_DRAFT } ${ transactionID } ` ] = {
226- participants,
227- participantsAutoAssigned : true ,
228- } ;
229- } ) ;
230- // eslint-disable-next-line rulesdir/prefer-actions-set-data
231- return Onyx . mergeCollection ( ONYXKEYS . COLLECTION . TRANSACTION_DRAFT , updatedTransactions ) ;
232- }
233-
234219export {
235220 calculateAmount ,
236221 insertTagIntoTransactionTagsString ,
@@ -243,5 +228,4 @@ export {
243228 formatCurrentUserToAttendee ,
244229 shouldStartLocationPermissionFlow ,
245230 navigateToParticipantPage ,
246- setMultipleMoneyRequestParticipantsFromReport ,
247231} ;
0 commit comments