-
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
[$500] Wallet - Two default tagged bank account exist after adding the second one #34774
Comments
Triggered auto assignment to @MitchExpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01df86e2c207d235f0 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue2 bank accounts with Default badge can be seen after adding the second bank account until the user navigates away then opens the Wallet page again or performs refresh on web. What is the root cause of that problem?When we add the first account (eg. Plaid Saving) this has the
which filters the paymentMethods based on if there's any method with accountType When we add the second account (eg. Plaid Checking), this will also be added with isDefault: true and because of the function mentioned above, both of them will display the Default badge since both have isDefault: true and now the filtered array length will be > 1 when called for each item. What changes do you think we should make in order to solve the problem?Within Add the following changes to the
const firstMethodByDate = _.min(bankAccountList, (method) => new Date(method.accountData?.created ?? ''));
combinedPaymentMethods.push({
...bankAccount,
...(typeof firstMethodByDate !== 'number' && {isDefault: bankAccount.methodID === firstMethodByDate.methodID}),
// rest of the code Implementing this change front-end wise ensures that when we add the second account, only one will have the Default badge and that one is the same one that will have the Default badge after Wallet re-fetch. VideosMacOS: Chrome / SafariScreen.Recording.2024-01-19.at.16.36.32.movI also found some redundant code within
|
Hmm I'm running into a "Missing translation" error when choosing the same Fidelity test account. Did you reproduce successfully @ikevin127 ? |
@MitchExpensify Yes I did, both on staging and local dev w/ staging api sandbox toggled on from Preferences. It works w/ any account (I used gmail) using the sandbox credentials. Fidelity can be replaced w/ City Bank or any other. If OP video is followed you'll get consistent reproduction of the issue. |
I get this no matter what bank I try with |
That's weird - most likely it's a generic BE error that doesn't have translation. |
@MitchExpensify The missing translation message is something expected for now, it only occurs for expensify.com domain users. But it will be fixed (ref: https://expensify.slack.com/archives/C049HHMV9SM/p1705523289822429?thread_ts=1705435804.140879&cid=C049HHMV9SM) |
This is a backend issue. Currently the BE always sets the default to the last added bank. If we add 2 banks, first request's response will have isDefault since it's the only one and second request's response will also have isDefault since it's the last added one. I don't know if this is intended, if it's not we can just set isDefault only for the first bank. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I think we should be using the server as the source of truth here. If the bank account comes back as the The only solution from the backend would be to always return all bank accounts which seems pretty inefficient |
@stitesExpensify Why is the server returning |
Hi @s77rt and @stitesExpensify, I understand your concerns. I've wrote a proposal "to set |
ProposalPlease re-state the problem that we are trying to solve in this issue.Presence of two What is the root cause of that problem?The root cause of the problem lies in the backend implementation. Currently, when adding a bank account, the backend always sets the default to the last added bank. This leads to discrepancies in the default tagging of bank accounts. What changes do you think we should make in order to solve the problem?To address this issue, we propose modifying the AddPersonalBankAccountPage and addPersonalBankAccount to update the onyx store by setting
What alternative solutions did you explore? (Optional) |
This is intended behavior and has been this way for many years :) The idea is that if you're adding an entirely new bank account, you probably switched banks and want to use the new one for payments/transfers |
@ikevin127 Thanks for the proposal. Your RCA is correct. However the solution is s a workaround as Onyx will still have |
@brunovjk Thanks for the proposal. Your RCA is correct. Overall the solution looks good to me. 🎀 👀 🎀 C+ reviewed |
Current assignee @stitesExpensify is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Thanks for the review! 🚀 @brunovjk gg, make sure to handle the double |
@brunovjk Please don't raise a PR until being assigned |
ok :D thanks |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Issue not reproducible during KI retests. (First week) |
PR Ready for Review |
Current assignee @s77rt is eligible for the Internal assigner, not assigning anyone new. |
This issue has not been updated in over 15 days. @s77rt, @MitchExpensify, @stitesExpensify, @brunovjk eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
How is the PR review coming along, @s77rt ? |
@MitchExpensify The PR is closed. This requires a backend fix. @stitesExpensify will be working on this. |
Ok thanks, and is there any payment due here from your perspective @s77rt ? |
@MitchExpensify No, no payment is due here |
I can still reproduce this issue in staging. Sorry for the inconvenience @stitesExpensify but how are we with the solution on the backend? |
Yes. Just like that issue, unfortunately I don't think that this can be prioritized right now. Do you agree @MitchExpensify? |
Agree this isn't important to fix, happy to close |
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: 1.4.27-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
Only one Default tagged bank account should exist
Actual Result:
Default tagged 2 bank account exist after adding the second bank account unless navigate to other page and return
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6347080_1705613704650.mobizen_20240118_220604.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: