You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Distance-Split distance shows YER currency instead INR #83606
Version Number: V9.3.26-4 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82257 Email or phone of affected tester (no customers):dreamnitethedragon+yydyd373@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Redminote 10S Android 13 App Component: Money Requests
Action Performed:
Launch app
Create workpace with INR currency [default currency]
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
When a user creates a distance expense on a workspace with INR currency, then changes the workspace currency to YER, and then splits the distance expense, the split shows YER currency instead of the original INR. The split flow uses the workspace's current currency for rate/merchant calculations rather than the original transaction's currency.
What is the root cause of that problem?
The root cause is in how the split expense flow retrieves the mileage rate for distance calculations. Every distance-related split operation calls DistanceRequestUtils.getRate({transaction, policy}) with the current policy object. This function reads the mileage rate (including its currency) from the policy's current custom unit configuration (DistanceRequestUtils.ts:388-398):
currency: mileageRate?.currency ?? policyCurrency
When the workspace currency changes from INR to YER, the policy's distance custom unit rates are updated to reflect YER. So getRate() now returns a rate with currency: "YER".
This rate is then passed to updateSplitExpenseDistanceFromAmount() in Split.ts:1914, where the currency priority is:
Since mileageRate.currency (YER from the current policy) takes precedence over transactionCurrency (INR from the original transaction), the merchant string and rate calculations all use the wrong currency. This affects six call sites in Split.ts (lines ~2062, ~2136, ~2203, ~2320, ~2386) and the SplitExpenseEditPage.tsx.
Note: The transaction's currency field itself is correctly set from the original transaction (Split.ts:1170), so the stored currency is right — but the displayed merchant strings and rate calculations are wrong.
What changes do you think we should make in order to solve the problem?
In updateSplitExpenseDistanceFromAmount() (Split.ts), the currency used for the merchant string should prioritize the original transaction's currency over the mileage rate's currency. The fix is to change the currency priority in the getDistanceMerchantFromDistance call from:
This ensures the original transaction's currency (INR) is used for the merchant display string, not the current policy rate's currency (YER). The same pattern should be checked in updateSplitExpenseField and updateSplitExpenseAmountField where similar currency priority exists.
What alternative solutions did you explore? (Optional)
An alternative would be to snapshot the mileage rate and its currency on the transaction at creation time, so the split flow reads from the transaction's stored rate rather than looking it up from the live policy. However, this would be a larger change. The simpler fix of prioritizing transactionCurrency in the merchant calculation addresses the immediate display issue.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Distance-Split distance shows YER currency instead INR[/-][+][$250] Distance-Split distance shows YER currency instead INR[/+]on Feb 26, 2026
The fix swaps the currency fallback priority in two places in Split.ts so the original transaction's currency takes precedence over the current policy's mileage rate currency. All 53 existing split tests pass.
Please mark it as "Ready for review" when it is ready for review.
📣 @Waryjustice! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Activity
melvin-bot commentedon Feb 26, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82257
melvin-bot commentedon Feb 26, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 26, 2026
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Feb 26, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Feb 26, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user creates a distance expense on a workspace with INR currency, then changes the workspace currency to YER, and then splits the distance expense, the split shows YER currency instead of the original INR. The split flow uses the workspace's current currency for rate/merchant calculations rather than the original transaction's currency.
What is the root cause of that problem?
The root cause is in how the split expense flow retrieves the mileage rate for distance calculations. Every distance-related split operation calls
DistanceRequestUtils.getRate({transaction, policy})with the current policy object. This function reads the mileage rate (including its currency) from the policy's current custom unit configuration (DistanceRequestUtils.ts:388-398):When the workspace currency changes from INR to YER, the policy's distance custom unit rates are updated to reflect YER. So
getRate()now returns a rate withcurrency: "YER".This rate is then passed to
updateSplitExpenseDistanceFromAmount()inSplit.ts:1914, where the currency priority is:Since
mileageRate.currency(YER from the current policy) takes precedence overtransactionCurrency(INR from the original transaction), the merchant string and rate calculations all use the wrong currency. This affects six call sites inSplit.ts(lines ~2062, ~2136, ~2203, ~2320, ~2386) and theSplitExpenseEditPage.tsx.Note: The transaction's
currencyfield itself is correctly set from the original transaction (Split.ts:1170), so the stored currency is right — but the displayed merchant strings and rate calculations are wrong.What changes do you think we should make in order to solve the problem?
In
updateSplitExpenseDistanceFromAmount()(Split.ts), the currency used for the merchant string should prioritize the original transaction's currency over the mileage rate's currency. The fix is to change the currency priority in thegetDistanceMerchantFromDistancecall from:to:
This ensures the original transaction's currency (INR) is used for the merchant display string, not the current policy rate's currency (YER). The same pattern should be checked in
updateSplitExpenseFieldandupdateSplitExpenseAmountFieldwhere similar currency priority exists.What alternative solutions did you explore? (Optional)
An alternative would be to snapshot the mileage rate and its currency on the transaction at creation time, so the split flow reads from the transaction's stored rate rather than looking it up from the live policy. However, this would be a larger change. The simpler fix of prioritizing
transactionCurrencyin the merchant calculation addresses the immediate display issue.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Feb 26, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)[-]Distance-Split distance shows YER currency instead INR[/-][+][$250] Distance-Split distance shows YER currency instead INR[/+]melvin-bot commentedon Feb 26, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022027091070414553218
puneetlath commentedon Feb 26, 2026
@MelvinBot can you raise the PR?
MelvinBot commentedon Feb 26, 2026
Draft PR created: #83618
The fix swaps the currency fallback priority in two places in
Split.tsso the original transaction's currency takes precedence over the current policy's mileage rate currency. All 53 existing split tests pass.Please mark it as "Ready for review" when it is ready for review.
m-natarajan commentedon Feb 27, 2026
Not reproduce, Chrome / v9.3.26-8 (Waiting for the validation result for Android)
Screen.Recording.2026-02-27.at.15.33.16.mp4
Waryjustice commentedon Mar 6, 2026
can i be assigned this issue
melvin-bot commentedon Mar 6, 2026
📣 @Waryjustice! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
ahmedGaber93 commentedon Mar 9, 2026
@sonialiap I think we can close this now. PR is deployed and issue is not reproduced #83606 (comment).