Revert "Fix distance rate auto-selection when submitting from Self DM to workspace"#86348
Revert "Fix distance rate auto-selection when submitting from Self DM to workspace"#86348aldo-expensify wants to merge 1 commit intomainfrom
Conversation
|
@chuckdries Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I'm still seeing the bug with this revert... |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41bd87c7de
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| !transactionID || | ||
| !lastSelectedRate || | ||
| (isMovingTransactionFromTrackExpense && customUnitRateID === CONST.CUSTOM_UNITS.FAKE_P2P_ID) || | ||
| isMovingTransactionFromTrackExpense || |
There was a problem hiding this comment.
Allow auto-select when moving expense rate ID is '-1'
This unconditional isMovingTransactionFromTrackExpense guard blocks the setCustomUnitRateID(..., lastSelectedRate, ...) path for all submit/share/categorize flows, including the distance-rate upgrade/new-rate flow where we intentionally set customUnitRateID to '-1' before returning to confirmation (src/pages/iou/request/step/IOURequestStepUpgrade.tsx:111). In that scenario, the effect now exits early and never applies the last selected workspace rate, which regresses rate auto-selection and can leave users with an invalid/default rate unless they manually reselect it.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
#85942 was not the real culprit |
Reverts #85942
$ #86337