Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,14 @@ function MoneyRequestConfirmationList({
!isPolicyExpenseChat ||
!transactionID ||
!lastSelectedRate ||
isMovingTransactionFromTrackExpense ||

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow self-DM submit flow to restore the chosen distance rate

In the track-expense → submit upgrade path, IOURequestStepUpgrade intentionally resets the draft rate to '-1' before navigating to the workspace-rate creation flow, and this effect is the only place that later replaces that placeholder with lastSelectedRate on the confirmation screen. Re-adding isMovingTransactionFromTrackExpense to the guard disables that recovery exactly for SUBMIT/SHARE/CATEGORIZE, so after creating a new distance rate from a self DM the draft can stay on the placeholder rate, MoneyRequestConfirmationList keeps formError === 'iou.error.invalidRate', and the user is blocked from confirming the expense.

Useful? React with 👍 / 👎.

!selectedParticipants.some((participant) => participant.policyID === policy?.id)
) {
return;
}

setCustomUnitRateID(transactionID, lastSelectedRate, transaction, policy);
}, [customUnitRateID, transactionID, lastSelectedRate, isDistanceRequest, isPolicyExpenseChat, transaction, policy, selectedParticipants]);
}, [customUnitRateID, transactionID, lastSelectedRate, isDistanceRequest, isPolicyExpenseChat, isMovingTransactionFromTrackExpense, transaction, policy, selectedParticipants]);

const splitParticipants = useMemo(() => {
if (!isTypeSplit) {
Expand Down
Loading