Closed IuliiaHerets closed 3 weeks ago
Triggered auto assignment to @garrettmknight (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.
@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Deactivate Card
and error message could not be dismissed.Deactivate Card
button.For redirecting based on whether we want to redirect to wallet or card page add....
// redirect to wallet page
Navigation.navigate(ROUTES.SETTINGS_WALLET.getRoute());
or
// redirect to card page
Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));
And for dismissing error revert canDismissError
to true
here
https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/PaymentMethodList.tsx#L220
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
In ReportVirtualCardFraudPage we use cardList?.[cardID].errors
to check whether the form encountered any error or not.
In case of the bug, after clicking on the "Deactivate card" button, there is an error returned by BE, leads to the condition:
https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx#L54
is true
, hence the redirect logic:
https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx#L58
is not called.
However, no error message was displayed on that page. It is because, in the logic to get the error, we use:
https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx#L46
which will always be ''
, it should be const virtualCardError = ErrorUtils.getLatestErrorMessage(virtualCard)
,
that leads to there is no error message displayed in:
https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx#L76
const virtualCardError = ErrorUtils.getLatestErrorMessage(virtualCard)
We can hide the "Close" button beside the error like we did in here: https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/PaymentMethodList.tsx#L220
So we just need to update: https://github.com/Expensify/App/blob/ecb629d42de6ff0e1c6315193fc0b76644cf7fad/src/pages/settings/Wallet/PaymentMethodList.tsx#L253 to:
canDismissError: false,
dismissError
function: if (item.cardID) {
Onyx.merge(`cardList`, {
[item.cardID]: {
errors: null,
},
});
return;
}
Job added to Upwork: https://www.upwork.com/jobs/~021834534968013390587
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External
)
Proposal Please re-state the problem that we are trying to solve in this issue. No redirect occurs after hitting the button, the button can be hit several times. Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button. Solution: we can redirect it to the specific user's card itself such that Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));
@user Your proposal will be dismissed because you did not follow the proposal template.
Proposal Please re-state the problem that we are trying to solve in this issue. "No redirect occurs after hitting the button, the button can be hit several times."
What is the root cause of that problem? "not targeting the id to card"
What changes do you think we should make in order to solve the problem? "we can redirect it to the specific user's card itself such that Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));"
What alternative solutions did you explore? (Optional)
Thanks for the proposals! @dominictb 's Proposal looks good to me. We’ll need to update the passed parameter in the virtualCardError
value. I also agree with the part where we update the Onyx value for the card and set the errors value to null when the close icon is pressed on the Wallet screen.
Sidenote: I’m currently not receiving any error message when I press "Deactivate Card". @dominictb, if you can reliably reproduce this issue, please add it to the test steps in the PR.
🎀 👀 🎀 C+ reviewed
Triggered auto assignment to @cead22, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @dominictb 🎉 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 📖
Approving again to reassign the internal engineer, as Carlos is OOO.
🎀 👀 🎀
Triggered auto assignment to @dangrous, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Went to staging yesterday.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.46-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-10-16. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[x] [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
[x] [@jayeshmangwani] 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: https://github.com/Expensify/App/pull/34716#discussion_r1803339187
[x] [@jayeshmangwani] A discussion in #expensify-bugs 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: N/A
[x] [@jayeshmangwani] Determine if we should create a regression test for this bug. No, This is a general flow for when errors should be displayed and dismissed. I don't think we need a dedicated regression test for this.
[x] [@jayeshmangwani] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
@cead22, @garrettmknight, @dangrous, @jayeshmangwani, @dominictb Eep! 4 days overdue now. Issues have feelings too...
Not overdue. Just undergoing payment process
Payment Summary:
@jayeshmangwani request when you're ready!
Confirming that the payment summary here is correct.
$250 approved for @jayeshmangwani
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: v9.0.32-3 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+en@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
PreCond: User has Expensify Card set up and assigned
Expected Result:
User expects that after the loading spinner on the button, a redirect occurs
Actual Result:
No redirect occurs after hitting the button, the button can be hit several times. Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/81215eaf-c480-4e45-9de4-420b35859b17
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @garrettmknight