Skip to content

Commit

Permalink
Enhance optimistic invoice report creation by improving receiver disp…
Browse files Browse the repository at this point in the history
…lay name fallback logic
  • Loading branch information
rezkiy37 committed Dec 17, 2024
1 parent 668dcdf commit 95e6276
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,14 @@ function getSendInvoiceInformation(
}

// STEP 2: Create a new optimistic invoice report.
const optimisticInvoiceReport = ReportUtils.buildOptimisticInvoiceReport(chatReport.reportID, senderWorkspaceID, receiverAccountID, receiver.displayName ?? '', amount, currency);
const optimisticInvoiceReport = ReportUtils.buildOptimisticInvoiceReport(
chatReport.reportID,
senderWorkspaceID,
receiverAccountID,
receiver.displayName ?? (receiverParticipant as Participant)?.login ?? '',
amount,
currency,
);

// STEP 3: Build optimistic receipt and transaction
const receiptObject: Receipt = {};
Expand Down

0 comments on commit 95e6276

Please sign in to comment.