Skip to content
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: Wallet page does not update instantly when bank account is added or deleted #30700

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/pages/settings/Wallet/WalletPage/WalletPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen
Navigation.navigate(source === CONST.KYC_WALL_SOURCE.ENABLE_WALLET ? ROUTES.SETTINGS_WALLET : ROUTES.SETTINGS_WALLET_TRANSFER_BALANCE);
};

useEffect(() => {
PaymentMethods.openWalletPage();
}, []);

useEffect(() => {
// If the user was previously offline, skip debouncing showing the loader
if (!network.isOffline) {
Expand All @@ -275,7 +271,7 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen
return;
}
PaymentMethods.openWalletPage();
}, [network.isOffline]);
}, [network.isOffline, bankAccountList, cardList]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}, [network.isOffline, bankAccountList, cardList]);
}, [network.isOffline, bankAccountList, cardList, fundList]);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pujan92 can you apply this change? I am checklisting right now

The bug still happens in credit card case

Screen.Recording.2023-11-02.at.9.19.39.PM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


useEffect(() => {
if (!shouldListenForResize) {
Expand Down