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

[Paid] [HOLD for payment 2023-10-31] [$500] [HIGH] [P2P ACTIVATION] GBR is not shown when a pending payment is waiting on the user to enable their wallet #30033

Closed
kevinksullivan opened this issue Oct 19, 2023 · 44 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

@kevinksullivan
Copy link
Contributor

kevinksullivan commented Oct 19, 2023

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


Coming from : https://expensify.slack.com/archives/C05RECHFBEW/p1697739357210919

And #29430 is the relevant PR that will likely need to be revisited.

Action Performed:

  1. Send an IOU from user without enabled wallet to another account with an enabled wallet
  2. Pay the IOU from the other account

Expected Result:

There should be a system message prompting the user to enable their wallet, and there should be a GBR in the chat for that user, since they have an outstanding action to collect the funds.

Actual Result:

There is no GBR

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d5e47fb869ecebeb
  • Upwork Job ID: 1715313432707346432
  • Last Price Increase: 2023-10-20
  • Automatic offers:
    • situchan | Contributor | 27292792
    • b4s36t4 | Contributor | 27294338
@kevinksullivan kevinksullivan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 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

@trjExpensify trjExpensify assigned trjExpensify and unassigned lschurr Oct 20, 2023
@trjExpensify
Copy link
Contributor

I'll take over the BZ on this one. CC: @samh-nl @akinwale as we're discussing in this thread.

@samh-nl
Copy link
Contributor

samh-nl commented Oct 20, 2023

Proposal

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

Add a green brick road indicator

What is the root cause of that problem?

Missing check

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

In OptionRowLHN we should add a condition here:

const shouldShowGreenDotIndicator =

What alternative solutions did you explore? (Optional)

@techievivek
Copy link
Contributor

@b4s36t4
Copy link
Contributor

b4s36t4 commented Oct 20, 2023

Proposal

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

GBR is not shown when a pending payment is waiting on the user to enable their wallet

What is the root cause of that problem?

We have written a condition to show the GBR if there is any action needed from the user here in this line

if (report.hasOutstandingIOU && report.ownerAccountID === currentUserAccountID && report.isWaitingOnBankAccount) {

But if see the condition it's going to be false in case isWaitingOnBankAccount this being true. As the other user paid the amount we mark the property hasOutStandIOU as false which makes the conditional doesn't work.

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

We need to update the condition here

if (report.hasOutstandingIOU && report.ownerAccountID === currentUserAccountID && report.isWaitingOnBankAccount) {
as followed.

if ((report.hasOutstandingIOU || report.isWaitingOnBankAccount) && report.ownerAccountID === currentUserAccountID) {
        return true;
    }

In this way if the user doesn't had setup a wallet we show GBR.

What alternative solutions did you explore? (Optional)

NA

Screenshot 2023-10-20 at 3 50 56 PM

For Double System Message

#30033 (comment) Starting from the RCA from this comment.

As Vivek suggested we need to stop rendering the reportAction.

const shouldHideAction = originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY && props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU;

The above lines does check for the reportAction which does have the action type as iou and the iou type is pay using this we can stop rendering the reportaction fully.

{!shouldHideAction && renderReportActionItem(hovered || isReportActionLinked, isWhisper, hasErrors)}
Kapture.2023-10-20.at.18.01.30.mp4

@techievivek
Copy link
Contributor

techievivek commented Oct 20, 2023

RCA for double system message when a payer pays the money request via wallet flow:

We have two IOU actions when a user pays a money request via wallet(one for create and one for pay).

Create IOU action gets used for rendering the MoneyRequestAction from here:

<MoneyRequestAction

The reimbursememntQueued action gets used to show the enable wallet button and the system message informing we are waiting for the payee to enable their wallet/bank account.

The remaining IOU action(type:Pay) falls under else block here:

and we show a different system message saying the payee needs to enable their bank account(because isWaitingBankAccount is set on the report.(Checkout the getReportPreview method).

Solution:
We want to skip rendering anything if the request is not sendingMoney and IOU action is of type pay.

@techievivek techievivek added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 20, 2023
@melvin-bot melvin-bot bot changed the title [HIGH] [P2P ACTIVATION] GBR is not shown when a pending payment is waiting on the user to enable their wallet [$500] [HIGH] [P2P ACTIVATION] GBR is not shown when a pending payment is waiting on the user to enable their wallet Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@techievivek techievivek assigned situchan and unassigned eVoloshchak Oct 20, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@situchan
Copy link
Contributor

@b4s36t4 the root cause is correct but the solution is wrong.
isWaitingOnBankAccount is true on both accounts. We should not show GBR on payer side

@situchan
Copy link
Contributor

@techievivek should we fix double message issue as well here and ask contributors update proposal?

@techievivek
Copy link
Contributor

Yes, please.

@b4s36t4 the root cause is correct but the solution is wrong.
isWaitingOnBankAccount is true on both accounts. We should not show GBR on payer side

Good one. 👌

@b4s36t4
Copy link
Contributor

b4s36t4 commented Oct 20, 2023

@situchan @techievivek Will update my proposal soon.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Oct 20, 2023

@situchan updated proposal for the first issue (GBR). Working on the double system message fix. Will update soon.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Oct 20, 2023

Updated the proposal to include the double system message as well.

@melvin-bot melvin-bot bot added the Overdue label Nov 1, 2023
@trjExpensify
Copy link
Contributor

👋 checklist time! Bump, @situchan.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 2, 2023
@techievivek
Copy link
Contributor

Not overdue, gentle bump @situchan ^

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 6, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

@trjExpensify, @techievivek, @b4s36t4, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@situchan
Copy link
Contributor

situchan commented Nov 9, 2023

No regression. This is new feature.

I am not sure regression test is needed as it requires gold wallet which QA team doesn't have.

@melvin-bot melvin-bot bot removed the Overdue label Nov 9, 2023
@trjExpensify
Copy link
Contributor

Interesting. @kevinksullivan @joekaufmanexpensify are their no wallet regression tests in the app?

@trjExpensify
Copy link
Contributor

Confirming payments as follows:

@situchan $500 for C+ review
@b4s36t4 $500 for the bug fix.

@trjExpensify
Copy link
Contributor

Settled up with you both! Keeping open for a sec while we discuss await this.

@trjExpensify trjExpensify changed the title [HOLD for payment 2023-11-01] [HOLD for payment 2023-10-31] [$500] [HIGH] [P2P ACTIVATION] GBR is not shown when a pending payment is waiting on the user to enable their wallet [Paid] [HOLD for payment 2023-10-31] [$500] [HIGH] [P2P ACTIVATION] GBR is not shown when a pending payment is waiting on the user to enable their wallet Nov 10, 2023
@b4s36t4
Copy link
Contributor

b4s36t4 commented Nov 10, 2023

@trjExpensify isn't this also eligible for urgency bonus? We have a single pr for the both issues can you check please?

@trjExpensify
Copy link
Contributor

I don't think we double up the urgency bonus for every issue a PR is linked to. It's a bonus for moving forward the PR with urgency, so I applied it on the payment for the other issue. 👍

@joekaufmanexpensify
Copy link
Contributor

are their no wallet regression tests in the app?

I see a few in testrail. I think the original P2P implementation was before we had standardized on the current regression testing system in Testrail. I bet the few that have been added were part of the #gold-wallets room/project.

@melvin-bot melvin-bot bot added the Overdue label Nov 13, 2023
@trjExpensify
Copy link
Contributor

Erm, I might be blind. Mind linking me to them?

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
Copy link

melvin-bot bot commented Nov 13, 2023

@trjExpensify, @techievivek, @b4s36t4, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@joekaufmanexpensify
Copy link
Contributor

Erm, I might be blind. Mind linking me to them?

I see some in the Edit IOUs and other tests section: https://expensify.testrail.io/index.php?/suites/view/7722&group_by=cases:section_id&group_order=asc&display_deleted_cases=0&group_id=296079

@trjExpensify
Copy link
Contributor

Hm, weird place for them. Also, it's creating a Wallet via OldDot.

Log in with a new applause.expensifail account
Navigate to OldDot > Account > Payments and add a Personal Bank account using the credentials shared below
Verify you see a payment type for WALLET with a deposit status of "Silver"

@joekaufmanexpensify
Copy link
Contributor

Ah, interesting. Then, maybe there aren't really any for the NewDot P2P yet

@trjExpensify
Copy link
Contributor

Asked here in the #gold-wallets channel.

@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

@trjExpensify, @techievivek, @b4s36t4, @situchan Huh... This is 4 days overdue. Who can take care of this?

@trjExpensify
Copy link
Contributor

Okay, put that on the radar of the gold wallets team. Going to close this out now.

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
None yet
Development

No branches or pull requests

9 participants