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 - No feature list is displayed in Wallet page #32385
Version Number: 1.4.7-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:
changed the title [-]Wallet - No feature list is displayed in Wallet page[/-][+][$500] Wallet - No feature list is displayed in Wallet page[/+]on Dec 1, 2023
Please re-state the problem that we are trying to solve in this issue.
Wallet - No feature list is displayed in Wallet page.
What is the root cause of that problem?
We check if the userWallet object is empty or not to determine if the user has a connected wallet but the basic wallet details are added by default when the user signs-up so the object is never empty even if the user has not enabled the wallet.
What changes do you think we should make in order to solve the problem?
We need to add few more checks apart from !_.isEmpty to determine if the user has enabled the wallet or not. We can use some default properties in the userWallet object like hasAcceptedTerms or hasPaymentMethod .
When we are at the feature list we can also show the Enable Expensify Wallet option when Add Payment Method button is clicked so that user has both options.
Please re-state the problem that we are trying to solve in this issue.
Wallet - No feature list is displayed in Wallet page.
What is the root cause of that problem?
The feature does not show as the variable hasWallet on WalletPage.js resolves to true.
This happens as even on new Account Creation, the user already has a wallet object:
The flow is for the user to activate the wallet using KYC.
So when checking if we want to show the WalletEmptyState component to the user, we should use hasActivatedWallet here.
What changes do you think we should make in order to solve the problem?
Actually that PR meant to show the WalletCard on Wallet Page in every case but we need to show the WalletEmptyState component when hasBankAccount, hasWallet & hasAssignedCard are false, here we can replace hasWallet with has any other variable which checks for walletLinkedAccountID or hasActivatedWallet variable that I mentioned in my proposal.
Activity
[-]Wallet - No feature list is displayed in Wallet page[/-][+][$500] Wallet - No feature list is displayed in Wallet page[/+]melvin-bot commentedon Dec 1, 2023
Job added to Upwork: https://www.upwork.com/jobs/~014f8c06a2b5c9f051
melvin-bot commentedon Dec 1, 2023
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 1, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 1, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu (
External)Krishna2323 commentedon Dec 1, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Wallet - No feature list is displayed in Wallet page.
What is the root cause of that problem?
We check if the
userWalletobject is empty or not to determine if the user has a connected wallet but the basic wallet details are added by default when the user signs-up so the object is never empty even if the user has not enabled the wallet.App/src/pages/settings/Wallet/WalletPage/WalletPage.js
Line 68 in 414c08c
What changes do you think we should make in order to solve the problem?
We need to add few more checks apart from
!_.isEmptyto determine if the user has enabled the wallet or not. We can use some default properties in theuserWalletobject likehasAcceptedTermsorhasPaymentMethod.Or we can check like we do in
KYCWall:App/src/components/KYCWall/BaseKYCWall.js
Line 162 in 414c08c
Optional:
When we are at the feature list we can also show the
Enable Expensify Walletoption whenAdd Payment Methodbutton is clicked so that user has both options.Result
neonbhai commentedon Dec 2, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Wallet - No feature list is displayed in Wallet page.
What is the root cause of that problem?
The feature does not show as the variable
hasWalleton WalletPage.js resolves totrue.This happens as even on new Account Creation, the user already has a wallet object:
The flow is for the user to activate the wallet using KYC.
So when checking if we want to show the
WalletEmptyStatecomponent to the user, we should usehasActivatedWallethere.What changes do you think we should make in order to solve the problem?
We should change the line here:
App/src/pages/settings/Wallet/WalletPage/WalletPage.js
Line 71 in 414c08c
to
This will use the correct variable to calculate if we should show empty state.
Result
Screen.Recording.2023-12-02.at.6.56.10.AM.mov
Pujan92 commentedon Dec 2, 2023
Expected from here
Krishna2323 commentedon Dec 2, 2023
Actually that PR meant to show the
WalletCardonWallet Pagein every case but we need to show theWalletEmptyStatecomponent whenhasBankAccount,hasWallet&hasAssignedCardare false, here we can replacehasWalletwith has any other variable which checks forwalletLinkedAccountIDorhasActivatedWalletvariable that I mentioned in my proposal.App/src/pages/settings/Wallet/WalletPage/WalletPage.js
Line 338 in 414c08c
cc: @grgia
grgia commentedon Dec 3, 2023
Now that all users have wallets, we will no longer show the empty state. This is not a bug but by design @burczu @Krishna2323
Krishna2323 commentedon Dec 3, 2023
It means
WalletEmptyStateis redundant, right?burczu commentedon Dec 4, 2023
@Christinadobrzyn It looks like this is not a bug, based on these comments: #32385 (comment) and #32385 (comment).
Christinadobrzyn commentedon Dec 4, 2023
awesome! Thanks @burczu! I'll close without action based on #32385 (comment)