Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Martins <cmartins@expensify.com>
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 28, 2023
1 parent 1b176a9 commit 575524c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const propTypes = {
/** Report, if we're showing the details for one and using AvatarWithDisplay */
report: iouReportPropTypes,

/** The report's poolicy, if we're showing the details for a report and need info about it for AvatarWithDisplay */
/** The report's policy, if we're showing the details for a report and need info about it for AvatarWithDisplay */
policy: PropTypes.shape({
/** Name of the policy */
name: PropTypes.string,
Expand Down
1 change: 0 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ function getPolicyName(report, returnEmptyIfNotFound = false, policy = undefined

// Public rooms send back the policy name with the reportSummary,
// since they can also be accessed by people who aren't in the workspace

return lodashGet(finalPolicy, 'name') || report.policyName || report.oldPolicyName || noPolicyFound;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ function createSplitsAndOnyxData(participants, currentUserLogin, currentUserAcco
? ReportUtils.buildOptimisticExpenseReport(oneOnOneChatReport.reportID, oneOnOneChatReport.policyID, currentUserAccountID, splitAmount, currency)
: ReportUtils.buildOptimisticIOUReport(currentUserAccountID, accountID, splitAmount, oneOnOneChatReport.reportID, currency);
} else if (isOwnPolicyExpenseChat) {
// Because of the Expense reports are stored as negative values, we substract the total from the amount
// Because of the Expense reports are stored as negative values, we subtract the total from the amount
oneOnOneIOUReport.total -= splitAmount;
} else {
oneOnOneIOUReport = IOUUtils.updateIOUOwnerAndTotal(oneOnOneIOUReport, currentUserAccountID, splitAmount, currency);
Expand Down

0 comments on commit 575524c

Please sign in to comment.