-
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
[$250] Chat - Re-selection is required to change payment method from Pay elsewhere to Expensify #57381
Comments
Triggered auto assignment to @Gonals ( |
Triggered auto assignment to @lschurr ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 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:
|
Issue is not repro on production bandicam.2025-02-25.08-28-59-151.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.User must repeat the selection to change the payment method What is the root cause of that problem?When users select the different payment method, we will update the
App/src/components/SettlementButton/index.tsx Lines 182 to 185 in d97f1b4
That means onPress should not be changed. We can see in the dependencies, we include setFormError, we get it from
but it's not wrapped inside useCallback App/src/hooks/useDebouncedState.ts Line 28 in d97f1b4
That makes What changes do you think we should make in order to solve the problem?Wrap handleSetValue inside useCallback What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Job added to Upwork: https://www.upwork.com/jobs/~021894380561474132011 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox ( |
@suneox, this is a blocker, so let's prioritize accordingly 👍 |
Sure, I'll check this one within a few hours. |
@nkdengineer Although your solution can resolve this issue, could you please provide more explanation about savePreferredPaymentMethod updating Screen.Recording.2025-02-25.at.22.37.47.mp4 |
@suneox setFormError is not wrapped into useCallback so it’s updated whenever the parent re-renders or the props/state inside the component change. That means there’re many factors that cause the setFormError update. I think the offending PR can be #56759, since the issue is not reproducible when I revert this PR |
@nkdengineer I agree that #56759 is the offending PR. It looks like the useProductTrainingContext hook causes a re-render for the MoneyRequestConfirmationList page. 🎀 👀 🎀 C+ reviewed |
Current assignee @Gonals is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.5-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5646450
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: MacOS 14.7.4 / Safari, Chrome, Desktop. iPhone 15 Pro / 18.3.1. Google Pixel 5 / Android 14
App Component: Money Requests
Action Performed:
Expected Result:
User need to select another method once to change the payment method
Actual Result:
User must repeat the selection to change the payment method
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/3eb1de9f-9d16-4abf-87e5-0a263b713283
https://github.com/user-attachments/assets/6728379d-78bc-4b3f-9538-71ebb93965de
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @suneoxThe text was updated successfully, but these errors were encountered: