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

[$250] [HOLD for payment 2024-11-13] Wallet - Deactivated card is not removed from Wallet when it is deactivated in Wallet page #51738

Closed
6 of 8 tasks
izarutskaya opened this issue Oct 30, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

@izarutskaya
Copy link

izarutskaya commented Oct 30, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.55-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes - iOS
Email or phone of affected tester (no customers): applausetester+kh2210001@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Members.
  3. Click on your own profile.
  4. Click Add card.
  5. Assign a virtual card to yourself.
  6. Go to Wallet.
  7. Click on the card.
  8. Click Report virtual card fraud.
  9. Click Deactivate card.
  10. Go back to members and click on your own profile.
  11. Note that the deactivated card is removed.
  12. Go to Wallet.
  13. Note that the deactivated card is not removed.

Expected Result:

After the card is deactivated in Wallet, it should be removed in Wallet.

Actual Result:

After the card is deactivated in Wallet, it is removed from member profile and Expensify Card page but it still remains in Wallet.

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6650094_1730280094888.20241030_171420.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856352075978124643
  • Upwork Job ID: 1856352075978124643
  • Last Price Increase: 2024-11-12
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

Triggered auto assignment to @joekaufmanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@mountiny mountiny self-assigned this Oct 30, 2024
@joekaufmanexpensify
Copy link
Contributor

Reproduced.

2024-10-30_17-29-49.mp4

@joekaufmanexpensify
Copy link
Contributor

@mountiny LMK if I should make this one external

@mountiny
Copy link
Contributor

discussed the solution here

@twilight2294
Copy link
Contributor

twilight2294 commented Oct 31, 2024

Edited by proposal-police: This proposal was edited at 2024-10-31 08:52:47 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Card deactivated in Expensify Card page is not removed from member profile

What is the root cause of that problem?

When we call REPORT_VIRTUAL_EXPENSIFY_CARD_FRAUD API, we only clear the Onyx Form REPORT_VIRTUAL_CARD_FRAUD:

function reportVirtualExpensifyCardFraud(cardID: number) {
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.FORMS.REPORT_VIRTUAL_CARD_FRAUD,
value: {
isLoading: true,
},
},
];

but in ReportVirtualCardFraudPage page, we use CARD_LIST which stores the user's cash card and imported cards (including the Expensify Card):

const [cardList] = useOnyx(ONYXKEYS.CARD_LIST);

This is the reason why the member is not removed from wallet.

What changes do you think we should make in order to solve the problem?

While calling Deactive card API we should also clear the CARD_LIST:

    const optimisticData: OnyxUpdate[] = [
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: ONYXKEYS.FORMS.REPORT_VIRTUAL_CARD_FRAUD,
            value: {
                isLoading: true,
            },
        },
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: ONYXKEYS.CARD_LIST,
            value: {
                [cardID]: null,
            }
        }
    ];

Similarly if needed update failure data and if needed add success data. If we want then for offline case we can add offline feedback pattern as well, that can be decided during PR phase

If the same bug exists elsewhere we should look and fix there too.

@mountiny
Copy link
Contributor

This was not made external yet and @DylanDylann has worked on this project with us. Do you want to work on the PR?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 1, 2024
@joekaufmanexpensify
Copy link
Contributor

PR merged!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 6, 2024
@melvin-bot melvin-bot bot changed the title Wallet - Deactivated card is not removed from Wallet when it is deactivated in Wallet page [HOLD for payment 2024-11-13] Wallet - Deactivated card is not removed from Wallet when it is deactivated in Wallet page Nov 6, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 6, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.57-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-13. 🎊

For reference, here are some details about the assignees on this issue:

  • @DylanDylann requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Nov 6, 2024

@DylanDylann @joekaufmanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@joekaufmanexpensify
Copy link
Contributor

@DylanDylann mind tackling checklist here so we can prep for payment?

@DylanDylann
Copy link
Contributor

DylanDylann commented Nov 11, 2024

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment:

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Test:

  1. Go to workspace settings > Members.
  2. Click on your own profile.
  3. Click Add card.
  4. Assign a virtual card to yourself.
  5. Go to Wallet.
  6. Click on the card.
  7. Click Report virtual card fraud.
  8. Click Deactivate card.
  9. Go back to members and click on your own profile.
  10. Note that the deactivated card is removed.
  11. Go to Wallet.
  12. Note that the deactivated card is removed.

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Nov 12, 2024
@melvin-bot melvin-bot bot added the Daily KSv2 label Nov 12, 2024
@joekaufmanexpensify
Copy link
Contributor

Regression test issue here: https://github.com/Expensify/Expensify/issues/443510

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Nov 12, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-11-13] Wallet - Deactivated card is not removed from Wallet when it is deactivated in Wallet page [$250] [HOLD for payment 2024-11-13] Wallet - Deactivated card is not removed from Wallet when it is deactivated in Wallet page Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

Current assignee @DylanDylann is eligible for the External assigner, not assigning anyone new.

@joekaufmanexpensify joekaufmanexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 12, 2024
@joekaufmanexpensify
Copy link
Contributor

Only payment here is $250 to @DylanDylann for C+ review via Upwork.

@joekaufmanexpensify
Copy link
Contributor

@DylanDylann offer sent for $250!

@joekaufmanexpensify
Copy link
Contributor

Bumped in Slack

@DylanDylann
Copy link
Contributor

@joekaufmanexpensify All good now, thank you

@joekaufmanexpensify
Copy link
Contributor

Great, $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed

@joekaufmanexpensify
Copy link
Contributor

All set, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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
Development

No branches or pull requests

5 participants