Skip to content

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

Closed

Description

@izarutskaya

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 30, 2024
  2. melvin-bot commented on Oct 30, 2024

    @melvin-bot

    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.

  3. izarutskaya commented on Oct 30, 2024

    @izarutskaya
    Author

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

  4. self-assigned this
    on Oct 30, 2024
  5. joekaufmanexpensify commented on Oct 30, 2024

    @joekaufmanexpensify
    Contributor

    Reproduced.

    2024-10-30_17-29-49.mp4
  6. joekaufmanexpensify commented on Oct 30, 2024

    @joekaufmanexpensify
    Contributor

    @mountiny LMK if I should make this one external

  7. mountiny commented on Oct 31, 2024

    @mountiny
    Contributor

    discussed the solution here

  8. twilight2294 commented on Oct 31, 2024

    @twilight2294
    Contributor

    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.

  9. mountiny commented on Oct 31, 2024

    @mountiny
    Contributor

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

  10. added
    ReviewingHas a PR in review
    and removed on Nov 1, 2024
  11. 15 remaining items

  12. 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[/+] on Nov 12, 2024
  13. melvin-bot commented on Nov 12, 2024

    @melvin-bot
  14. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 12, 2024
  15. melvin-bot commented on Nov 12, 2024

    @melvin-bot

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

  16. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 12, 2024
  17. joekaufmanexpensify commented on Nov 12, 2024

    @joekaufmanexpensify
    Contributor

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

  18. joekaufmanexpensify commented on Nov 12, 2024

    @joekaufmanexpensify
    Contributor

    @DylanDylann offer sent for $250!

  19. joekaufmanexpensify commented on Nov 13, 2024

    @joekaufmanexpensify
    Contributor
  20. DylanDylann commented on Nov 13, 2024

    @DylanDylann
    Contributor

    @joekaufmanexpensify All good now, thank you

  21. joekaufmanexpensify commented on Nov 13, 2024

    @joekaufmanexpensify
    Contributor

    Great, $250 sent and contract ended!

  22. joekaufmanexpensify commented on Nov 13, 2024

    @joekaufmanexpensify
    Contributor

    Upwork job closed

  23. joekaufmanexpensify commented on Nov 13, 2024

    @joekaufmanexpensify
    Contributor

    All set, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions