-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix currency selected incorrectly after page reload #55825
Fix currency selected incorrectly after page reload #55825
Conversation
@DylanDylann 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2025-01-28.at.22.49.23.moviOS: NativeiOS: mWeb SafariScreen.Recording.2025-01-28.at.22.49.08.movMacOS: Chrome / SafariScreen.Recording.2025-01-28.at.22.48.07.movMacOS: DesktopScreen.Recording.2025-01-28.at.22.48.42.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work thanks. I love a targeted fix like this.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.0.92-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.92-6 🚀
|
Explanation of Change
When we reload the page, the currency is supposed to reset to
USD
in both Add payment card and Change payment currency pages, but because onyx caches data, the currency selector will stay stuck on the previously selected currency in the Change payment currency page.This PR addresses the issue by leveraging the
useOnyx
metadatastatus
to ensure we re-render the selector component in the Add payment card page when the status becomesloaded
instead of allowing fallback toCONST
value and not re-rendering which caused the previous (cached) value to show in the Change payment currency page.Fixed Issues
$ #55569
PROPOSAL: #55569 (comment)
Tests
Precondition: Have at least one WS created in order to have the Subscription section show-up in Settings.
AUD
(or any other than defaultUSD
).USD
in both Add payment card and Change payment currency pages.Offline tests
N/A.
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-.webm
Android: mWeb Chrome
android-mweb-.webm
iOS: Native
ios-.mp4
iOS: mWeb Safari
ios-mweb-.mp4
MacOS: Chrome / Safari
web-.mov
MacOS: Desktop
desktop-.mov