-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Wrong currency in request money page after login #25786
Conversation
@allroundexperts 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] |
@tienifr The request money screen keeps on loading if you're already logged in and reload the page. Can you please check? Screen.Recording.2023-08-24.at.10.36.08.PM.mov |
src/libs/actions/IOU.js
Outdated
let currentUserPersonalDetails = {}; | ||
Onyx.connect({ | ||
key: ONYXKEYS.PERSONAL_DETAILS_LIST, | ||
callback: (val) => { | ||
currentUserPersonalDetails = lodashGet(val, userAccountID, {}); | ||
if (val && SessionUtils.didUserLogInDuringSession() && shouldResetIOUAfterLogin) { |
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.
I think we might want to remove the didInitCurrency
outside this condition for this to work as intended.
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.
I tried removing it but seemed like the merge for didInitCurrency
happened too quick (even before resetRequestMoney
and thus there would be no loader shown.
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.
So what's the fix for this? With the current implementation, I see an infinitely loading screen.
#25786 (comment)
Bump on this @tienifr! |
@allroundexperts Sorry for the delay. I think we should check based on |
Reviewing this again today! |
Bump @allroundexperts |
@tienifr Deep linking is not working now 😞 Screen.Recording.2023-08-31.at.2.13.28.PM.mov |
I also faced this problem. I have reported the bug on Slack here. I think we should hold this PR until the bug is fixed @allroundexperts. |
The issue about deeplinks is up here #26852 and PR has been raised. |
@allroundexperts The PR to fix deeplink issue was merged. I think we're good to go. |
Bump @allroundexperts |
@tienifr I'm still unable to see the deep links fixed. Did you verify? Screen.Recording.2023-09-12.at.3.47.39.AM.mov |
@allroundexperts Worked fine on my side: deeplink-compressed.movDue to new features in request money flow, we should modify the test's deeplink as |
This is super weird. But its not working for me. Screen.Recording.2023-09-13.at.4.30.42.AM.mov |
Hmm but did you type in the deeplink before loging in? |
@allroundexperts Was the deeplink issue on your device fixed?
I mentioned this above, it might help. |
@tienifr I'm encountering a new failure. screen-recording-2023-09-20-at-125755-am_cNF81U7r.mp4 |
App crashes on |
@allroundexperts No more crashes after pulling currency-compressed.mov |
Reviewer Checklist
Screenshots/VideosWebscreen-recording-2023-09-26-at-34208-am_2ixmxpji.mp4Mobile Web - ChromeScreen.Recording.2023-09-26.at.3.53.58.AM.movMobile Web - SafariScreen.Recording.2023-09-26.at.3.47.55.AM.movDesktopScreen.Recording.2023-09-26.at.4.07.28.AM.moviOSScreen.Recording.2023-09-26.at.3.50.23.AM.movAndroidScreen.Recording.2023-09-26.at.3.57.14.AM.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.
Looks good.
FYI, there is console error when opening a deep link. It's not related and I have recorded it here |
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.
Thank you all for the work!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
} | ||
// eslint-disable-next-line no-use-before-define | ||
resetMoneyRequestInfo(); | ||
shouldResetIOUAfterLogin = false; |
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.
I am concerned that this is a hack that does not address the root cause of the problem. I think it is a mistake that the IOU in Onyx is the thing in charge of initializing currency.
I suggest reverting this PR since it has already been linked to a regression: #28280 and go back to the drawing board for a better solution.
Alternatively, you can wait for me to make progress and resolve #26538 which is an attempt to clean up a lot of the messing routing logic that is probably closer to the root of the problems.
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.
Thanks! I'm working on it.
I'm working on it. |
Regression PR is up #28410. |
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.75-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
Details
USD currency is displayed when navigating to request money page by deep-link though it's supposed to be user preference's currency. This PR fixes that.
Fixed Issues
$ #24393
PROPOSAL: #24393 (comment)
Tests
Offline tests
NA
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
deeplink-compressed.mov
Mobile Web - Chrome
video_2023-08-23_22-36-44.mp4
Mobile Web - Safari
Screen.Recording.2023-08-23.at.23.36.53.mov
Desktop
currency-desktop-compressed.mov
iOS
Screen.Recording.2023-08-23.at.22.36.01.mov
Android
Screen.Recording.2023-08-23.at.23.38.35.mov