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

[$500] Wallet - No feature list is displayed in Wallet page #32385

Closed
6 tasks done
lanitochka17 opened this issue Dec 1, 2023 · 12 comments
Closed
6 tasks done

[$500] Wallet - No feature list is displayed in Wallet page #32385

lanitochka17 opened this issue Dec 1, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 1, 2023

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.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:

Issue found when executing PR #32152

Action Performed:

Pre-requisite: user must be logged in and no accounts or wallet should have been connected

  1. Go to Settings > Wallet

Expected Result:

If no BA or wallet has been connected, the feature list should be displayed

Actual Result:

No feature list is displayed in Wallet page even if no account or wallet has been connected

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6297777_1701458348934.bandicam_2023-12-01_13-49-02-242.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014f8c06a2b5c9f051
  • Upwork Job ID: 1730706873964122112
  • Last Price Increase: 2023-12-01
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 1, 2023
@melvin-bot melvin-bot bot changed the title Wallet - No feature list is displayed in Wallet page [$500] Wallet - No feature list is displayed in Wallet page Dec 1, 2023
Copy link

melvin-bot bot commented Dec 1, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014f8c06a2b5c9f051

Copy link

melvin-bot bot commented Dec 1, 2023

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 1, 2023
Copy link

melvin-bot bot commented Dec 1, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 1, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu (External)

@Krishna2323
Copy link
Contributor

Krishna2323 commented 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 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.

const hasWallet = !_.isEmpty(userWallet);

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 .

Or we can check like we do in KYCWall :

const hasActivatedWallet = this.props.userWallet.tierName && _.contains([CONST.WALLET.TIER_NAME.GOLD, CONST.WALLET.TIER_NAME.PLATINUM], this.props.userWallet.tierName);

Optional:

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.

Result

@neonbhai
Copy link
Contributor

neonbhai commented 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 hasWallet on WalletPage.js resolves to true.
This happens as even on new Account Creation, the user already has a wallet object:

Screenshot 2023-12-02 at 6 58 19 AM

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?

We should change the line here:

const shouldShowEmptyState = !hasBankAccount && !hasWallet && !hasAssignedCard;

to

const shouldShowEmptyState = !hasBankAccount && !hasActivatedWallet && !hasAssignedCard;

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
Copy link
Contributor

Pujan92 commented Dec 2, 2023

Expected from here

@Krishna2323
Copy link
Contributor

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.

cc: @grgia

@grgia
Copy link
Contributor

grgia commented Dec 3, 2023

If no BA or wallet has been connected, the feature list should be displayed

Now that all users have wallets, we will no longer show the empty state. This is not a bug but by design @burczu @Krishna2323

@grgia grgia removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 3, 2023
@Krishna2323
Copy link
Contributor

It means WalletEmptyState is redundant, right?

@melvin-bot melvin-bot bot added the Overdue label Dec 4, 2023
@burczu
Copy link
Contributor

burczu commented Dec 4, 2023

@Christinadobrzyn It looks like this is not a bug, based on these comments: #32385 (comment) and #32385 (comment).

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2023
@Christinadobrzyn
Copy link
Contributor

awesome! Thanks @burczu! I'll close without action based on #32385 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants