@@ -8,7 +8,6 @@ import categoryPropTypes from '@components/categoryPropTypes';
88import ScreenWrapper from '@components/ScreenWrapper' ;
99import tagPropTypes from '@components/tagPropTypes' ;
1010import transactionPropTypes from '@components/transactionPropTypes' ;
11- import compose from '@libs/compose' ;
1211import * as CurrencyUtils from '@libs/CurrencyUtils' ;
1312import Navigation from '@libs/Navigation/Navigation' ;
1413import * as OptionsListUtils from '@libs/OptionsListUtils' ;
@@ -276,39 +275,31 @@ function EditRequestPage({betas, report, route, parentReport, policyCategories,
276275EditRequestPage . displayName = 'EditRequestPage' ;
277276EditRequestPage . propTypes = propTypes ;
278277EditRequestPage . defaultProps = defaultProps ;
279- export default compose (
280- withOnyx ( {
281- betas : {
282- key : ONYXKEYS . BETAS ,
278+ export default withOnyx ( {
279+ betas : {
280+ key : ONYXKEYS . BETAS ,
281+ } ,
282+ report : {
283+ key : ( { route} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ route . params . threadReportID } ` ,
284+ } ,
285+ policyCategories : {
286+ key : ( { report} ) => `${ ONYXKEYS . COLLECTION . POLICY_CATEGORIES } ${ report ? report . policyID : '0' } ` ,
287+ } ,
288+ policyTags : {
289+ key : ( { report} ) => `${ ONYXKEYS . COLLECTION . POLICY_TAGS } ${ report ? report . policyID : '0' } ` ,
290+ } ,
291+ parentReport : {
292+ key : ( { report} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ report ? report . parentReportID : '0' } ` ,
293+ } ,
294+ parentReportActions : {
295+ key : ( { report} ) => `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ report ? report . parentReportID : '0' } ` ,
296+ canEvict : false ,
297+ } ,
298+ transaction : {
299+ key : ( { report, parentReportActions} ) => {
300+ const parentReportActionID = lodashGet ( report , 'parentReportActionID' , '0' ) ;
301+ const parentReportAction = lodashGet ( parentReportActions , parentReportActionID ) ;
302+ return `${ ONYXKEYS . COLLECTION . TRANSACTION } ${ lodashGet ( parentReportAction , 'originalMessage.IOUTransactionID' , 0 ) } ` ;
283303 } ,
284- report : {
285- key : ( { route} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ route . params . threadReportID } ` ,
286- } ,
287- } ) ,
288- // eslint-disable-next-line rulesdir/no-multiple-onyx-in-file
289- withOnyx ( {
290- policyCategories : {
291- key : ( { report} ) => `${ ONYXKEYS . COLLECTION . POLICY_CATEGORIES } ${ report ? report . policyID : '0' } ` ,
292- } ,
293- policyTags : {
294- key : ( { report} ) => `${ ONYXKEYS . COLLECTION . POLICY_TAGS } ${ report ? report . policyID : '0' } ` ,
295- } ,
296- parentReport : {
297- key : ( { report} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ report ? report . parentReportID : '0' } ` ,
298- } ,
299- parentReportActions : {
300- key : ( { report} ) => `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ report ? report . parentReportID : '0' } ` ,
301- canEvict : false ,
302- } ,
303- } ) ,
304- // eslint-disable-next-line rulesdir/no-multiple-onyx-in-file
305- withOnyx ( {
306- transaction : {
307- key : ( { report, parentReportActions} ) => {
308- const parentReportActionID = lodashGet ( report , 'parentReportActionID' , '0' ) ;
309- const parentReportAction = lodashGet ( parentReportActions , parentReportActionID ) ;
310- return `${ ONYXKEYS . COLLECTION . TRANSACTION } ${ lodashGet ( parentReportAction , 'originalMessage.IOUTransactionID' , 0 ) } ` ;
311- } ,
312- } ,
313- } ) ,
314- ) ( EditRequestPage ) ;
304+ } ,
305+ } ) ( EditRequestPage ) ;
0 commit comments