Fix incorrect currency symbol in distance rate update changelog message - #98389
Open
mukhrr wants to merge 1 commit into
Open
Fix incorrect currency symbol in distance rate update changelog message#98389mukhrr wants to merge 1 commit into
mukhrr wants to merge 1 commit into
Conversation
Contributor
|
@mkhutornyi It looks like you are reviewer of this one, right? |
Open
7 tasks
Contributor
right |
Contributor
|
@garrettmknight Could you assign @mkhutornyi and unassign me? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
The rate-creation changelog message formats the raw amount client-side with
Intl(convertAmountToDisplayString), but the rate-update message rendered backend-preformattedoldValue/newValuestrings verbatim, so currencies like ARS showed the currency-list symbol (AR$1,40) instead of theIntlformat (ARS 1.40).The backend now sends raw
oldRate/newRate(in cents) andcurrencyin thePOLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATEoriginal message. This PR makesgetWorkspaceCustomUnitRateUpdatedMessageprefer those raw fields and format them withconvertAmountToDisplayString, the same helper the creation message uses, so both messages agree for every currency. The legacyoldValue/newValuestring branch is kept as a fallback for old cached actions.Fixed Issues
$ #93144
PROPOSAL: #93144 (comment)
Tests
Precondition: a workspace whose currency is not USD (e.g. ARS) with Distance rates enabled.
ARS 1.40 (previously ARS 1.30)), not the currency symbol (AR$1,40).Offline tests
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
IOS_app.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
IOS_app.mp4
iOS: mWeb Safari
IOS_web.mp4
MacOS: Chrome / Safari
93144-web.mp4