diff --git a/src/components/MoneyRequestHeader.tsx b/src/components/MoneyRequestHeader.tsx index 40c40f2203ff..13e8eb7be432 100644 --- a/src/components/MoneyRequestHeader.tsx +++ b/src/components/MoneyRequestHeader.tsx @@ -66,9 +66,6 @@ type MoneyRequestHeaderProps = MoneyRequestHeaderOnyxProps & { /** Method to trigger when pressing close button of the header */ onBackButtonPress: () => void; - - /** The reportID of the transaction thread report associated with this current report, if any */ - transactionThreadReportID?: string | null; }; function MoneyRequestHeader({ @@ -82,7 +79,6 @@ function MoneyRequestHeader({ policy, shouldUseNarrowLayout = false, onBackButtonPress, - transactionThreadReportID, }: MoneyRequestHeaderProps) { const styles = useThemeStyles(); const theme = useTheme(); @@ -117,8 +113,8 @@ function MoneyRequestHeader({ }, [parentReport?.reportID, parentReportAction, setIsDeleteModalVisible]); const markAsCash = useCallback(() => { - TransactionActions.markAsCash(transaction?.transactionID ?? '', transactionThreadReportID ?? ''); - }, [transaction?.transactionID, transactionThreadReportID]); + TransactionActions.markAsCash(transaction?.transactionID ?? '', report.reportID); + }, [report.reportID, transaction?.transactionID]); const isScanning = TransactionUtils.hasReceipt(transaction) && TransactionUtils.isReceiptBeingScanned(transaction); diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 7bfe2b704b5e..f1a5bbe10231 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -357,7 +357,6 @@ function ReportScreen({ parentReportAction={parentReportAction} shouldUseNarrowLayout={shouldUseNarrowLayout} onBackButtonPress={onBackButtonPress} - transactionThreadReportID={transactionThreadReportID} /> ); }