You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Wallet - Wallet page does not update instantly when bank account is added or deleted #29767
Version Number: 1.3.85-0 Reproducible in staging?: Yes Reproducible in production?: Yes 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:
Go to Settings > Wallet > Add payment method > Bank account
Proceed with adding a bank account
After adding a bank account, in the Wallet page, return to Settings and go back to Wallet
Note that now Expensify Wallet shows up
Delete the added bank account
Return to Settings and go back to Wallet
Now it only shows the intro page
Expected Result:
The Wallet page should update instantly when bank account is added or deleted
Actual Result:
When the bank account is added, Expensify Wallet does not show up until the Wallet page is revisited.
The same also happens when the bank account is deleted - Wallet introduction page only shows up after revisting the Wallet page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Please re-state the problem that we are trying to solve in this issue.
Wallet page doesn't update the wallet section on add/deletion of an account
What is the root cause of that problem?
Showing of that section depends on the userWallet data which we received from the backend with the OpenPaymentsPage api. This api is currently only called on the mount of the component but seems to be missed In the migration PR to consider calling again for bankAccountList/cardList.
What changes do you think we should make in order to solve the problem?
We should add dependencies bankAccountList & cardList in the useEffect for making a call to openWalletPage.
changed the title [-]Wallet - Wallet page does not update instantly when bank account is added or deleted[/-][+][$500] Wallet - Wallet page does not update instantly when bank account is added or deleted[/+]on Oct 18, 2023
Please re-state the problem that we are trying to solve in this issue.
When the bank account is added, Expensify Wallet does not show up until the Wallet page is revisited.
The same also happens when the bank account is deleted - Wallet introduction page only shows up after revisting the Wallet page
What is the root cause of that problem?
In here, we use the content of the userWallet to show the wallet page empty or has-data state.
However, when we add/delete the account/card, we don't have Pusher events on the wallet data, and we also don't have optimistic data. So only after going back to the wallet page, this will be called again and then the wallet is loaded.
What changes do you think we should make in order to solve the problem?
Add optimistic data (and failure restored data) to create wallet if this is the first bank account/card that's added
Add optimistic data (and failure restored data) to delete the wallet if we only have 1 last bank account/card and we're deleting it (perhaps, and the wallet balance is 0)
Add Pusher to send back updated wallet information after 1 and 2 above (in case the actual wallet has some differences with the optimistic wallet), or add the wallet details to the API response when we delete/create bank account/card
What alternative solutions did you explore? (Optional)
In 3, if we don't want to change the back-end, we can proactively trigger PaymentMethods.openWalletPage again after deleting/creating the bank account/card, by triggering it after the action is done, or add bankAccountList, cardList to useEffect dependency list that triggers the PaymentMethods.openWalletPage
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!
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!
I can't seem to reproduce this bug anymore. Even though we initially weren't sending out a Pusher update for the wallet in Onyx, we send one out when the user finishes the Terms KYC step. I don't think this bug should be happening anymore.
Activity
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)Pujan92 commentedon Oct 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Wallet page doesn't update the wallet section on add/deletion of an account
What is the root cause of that problem?
Showing of that section depends on the
userWalletdata which we received from the backend with theOpenPaymentsPageapi. This api is currently only called on the mount of the component but seems to be missed In the migration PR to consider calling again for bankAccountList/cardList.What changes do you think we should make in order to solve the problem?
We should add dependencies
bankAccountList&cardListin theuseEffectfor making a call toopenWalletPage.App/src/pages/settings/Wallet/WalletPage/WalletPage.js
Lines 248 to 250 in 623ea84
We can combine two(1, 2) blocks to one like below.
Result
Screen.Recording.2023-10-17.at.22.21.25.mp4
[-]Wallet - Wallet page does not update instantly when bank account is added or deleted[/-][+][$500] Wallet - Wallet page does not update instantly when bank account is added or deleted[/+]melvin-bot commentedon Oct 18, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0195a510ee20eb2208
melvin-bot commentedon Oct 18, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)tienifr commentedon Oct 19, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the bank account is added, Expensify Wallet does not show up until the Wallet page is revisited.
The same also happens when the bank account is deleted - Wallet introduction page only shows up after revisting the Wallet page
What is the root cause of that problem?
In here, we use the content of the
userWalletto show the wallet page empty or has-data state.However, when we add/delete the account/card, we don't have Pusher events on the wallet data, and we also don't have optimistic data. So only after going back to the wallet page, this will be called again and then the wallet is loaded.
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
In 3, if we don't want to change the back-end, we can proactively trigger
PaymentMethods.openWalletPageagain after deleting/creating the bank account/card, by triggering it after the action is done, or add bankAccountList, cardList touseEffectdependency list that triggers thePaymentMethods.openWalletPageadelekennedy commentedon Oct 20, 2023
two proposals above for you @situchan
29 remaining items
melvin-bot commentedon Nov 27, 2023
This issue has not been updated in over 15 days. @Pujan92, @jasperhuangg, @adelekennedy, @situchan 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!
situchan commentedon Nov 27, 2023
@jasperhuangg This requires backend fix as per #31149 (comment)
cc: @neil-marcellini
jasperhuangg commentedon Nov 30, 2023
Got it, thanks. I'll look into it when I get the chance!
melvin-bot commentedon Dec 25, 2023
This issue has not been updated in over 15 days. @Pujan92, @jasperhuangg, @adelekennedy, @situchan 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!
jasperhuangg commentedon Jan 2, 2024
I still haven't had a chance to look into this, but I can probably take another look at this this week.
jasperhuangg commentedon Jan 3, 2024
I can't seem to reproduce this bug anymore. Even though we initially weren't sending out a Pusher update for the wallet in Onyx, we send one out when the user finishes the Terms KYC step. I don't think this bug should be happening anymore.