Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jun 5, 2024
1 parent 3df8d03 commit dfad444
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ function ReportPreview({
if (ReportUtils.hasHeldExpenses(iouReport?.reportID)) {
setIsHoldMenuVisible(true);
} else if (chatReport && iouReport) {
IOU.payMoneyRequest(type, chatReport, iouReport, false);
if (ReportUtils.isInvoiceReport(iouReport)) {
IOU.payInvoice(type, chatReport, iouReport);
} else {
IOU.payMoneyRequest(type, chatReport, iouReport);
}
}
};

Expand Down Expand Up @@ -311,17 +315,6 @@ function ReportPreview({
};
}, [formattedMerchant, formattedDescription, moneyRequestComment, translate, numberOfRequests, numberOfScanningReceipts, numberOfPendingRequests]);

const confirmPayment = (paymentMethodType?: PaymentMethodType) => {
if (!paymentMethodType || !chatReport || !iouReport) {
return;
}
if (ReportUtils.isInvoiceReport(iouReport)) {
IOU.payInvoice(paymentMethodType, chatReport, iouReport);
} else {
IOU.payMoneyRequest(paymentMethodType, chatReport, iouReport);
}
};

return (
<OfflineWithFeedback
pendingAction={iouReport?.pendingFields?.preview}
Expand Down

0 comments on commit dfad444

Please sign in to comment.