-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2023-02-18] [$2000] Payment method actions doesn’t get dismissed when payment method deleted from different device #14524
Comments
Bug0 Triage ChecklistNote: see this SO for more information.
|
Will test what happens if you try deleting or setting the default password on that state to make sure this is something we want to fix or not and maybe start a discussion on #expensify-open-source |
Job added to Upwork: https://www.upwork.com/jobs/~01721c4a575a5223ab |
Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
Current assignee @PauloGasparSv is eligible for the External assigner, not assigning anyone new. |
I was the reporter and made initial proposal as part of slack report itself - https://expensify.slack.com/archives/C049HHMV9SM/p1674648521989299?thread_ts=1674584214.326729&cid=C049HHMV9SM index df20970bf2..56791d56a8 100644
--- a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
+++ b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
@@ -86,6 +86,18 @@ class BasePaymentsPage extends React.Component {
} else {
this.debounceSetShouldShowLoadingSpinner();
}
+ if (this.state.shouldShowDefaultDeleteMenu || this.state.shouldShowPasswordPrompt) {
+ if ((this.props.bankAccountList !== prevProps.bankAccountList && !_.find(this.props.bankAccountList, paymentMethod => paymentMethod.methodID === this.state.methodID))
+ || (this.props.cardList !== prevProps.cardList && !_.find(this.props.cardList, paymentMethod => paymentMethod.methodID === this.state.methodID))
+ || (this.props.payPalMeData !== prevProps.payPalMeData && prevProps.payPalMeData.methodID === this.state.methodID)) {
+ if (this.state.shouldShowDefaultDeleteMenu) {
+ this.hideDefaultDeleteMenu();
+ }
+ if (this.state.shouldShowPasswordPrompt) {
+ this.hidePasswordPrompt();
+ }
+ }
+ }
// previously online OR currently offline, skip fetch
if (!prevProps.network.isOffline || this.props.network.isOffline) {
@@ -518,6 +530,9 @@ export default compose(
cardList: {
key: ONYXKEYS.CARD_LIST,
},
+ payPalMeData: {
+ key: ONYXKEYS.PAYPAL,
+ },
walletTerms: {
key: ONYXKEYS.WALLET_TERMS,
}, Solution 2 --- a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
+++ b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
@@ -86,6 +86,21 @@ class BasePaymentsPage extends React.Component {
} else {
this.debounceSetShouldShowLoadingSpinner();
}
+ if (this.state.shouldShowDefaultDeleteMenu || this.state.shouldShowPasswordPrompt) {
+ if ((this.props.bankAccountList !== prevProps.bankAccountList
+ || this.props.cardList !== prevProps.cardList
+ || this.props.payPalMeData !== prevProps.payPalMeData)
+ && !_.find(PaymentUtils.formatPaymentMethods(this.props.bankAccountList, this.props.cardList, this.props.payPalMeData),
+ paymentMethod => paymentMethod.methodID === this.state.methodID)) {
+ if (this.state.shouldShowDefaultDeleteMenu) {
+ this.hideDefaultDeleteMenu();
+ }
+ if (this.state.shouldShowPasswordPrompt) {
+ this.hidePasswordPrompt();
+ }
+ }
+ }
// previously online OR currently offline, skip fetch
if (!prevProps.network.isOffline || this.props.network.isOffline) {
@@ -518,6 +533,9 @@ export default compose(
cardList: {
key: ONYXKEYS.CARD_LIST,
},
+ payPalMeData: {
+ key: ONYXKEYS.PAYPAL,
+ },
walletTerms: {
key: ONYXKEYS.WALLET_TERMS,
}, Add-ons we can do
|
Proposal I would add the necessary code to read when prop cardList changes in component BasePaymentPage, if this prop changes I would check if the payment method(selected to delete or set as default) still exists, if not I would change the state "shouldShowDefaultDeleteMenu" in BasePaymentPage component to false that way it would hide the "popup". Thanks, |
This comment was marked as duplicate.
This comment was marked as duplicate.
Looks like something related to As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our Feel free to drop a note in #expensify-open-source with any questions. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
PROPOSAL:
In the code it'll be: |
This comment was marked as off-topic.
This comment was marked as off-topic.
📣 @abdulrahuman5196 You have been assigned to this job by @PauloGasparSv! |
@PauloGasparSv @0xmiroslav Quick Tip: I usually have the test account logged-in on a incognito tab to quickly add test payment methods as soon as i delete. This helps to quickly verify the fix in multiple platforms. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.69-2 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 2023-02-18. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
Regression Test
|
@sophiepintoraetz Gentle remainder. This issue has passed 7 days regression timeframe. I have applied for the upwork job as well. |
@abdulrahuman5196 - please don't bump the GH for payment unless there's been a significant time lapse (I'm talking weeks). We have our own method for keeping track of payments (see the daily label vs weekly) and considering the 18th is a weekend for me, there wasn't going to be an opportunity until today. |
Actually, don't mind me - I miscalculated the bonus @abdulrahuman5196! @0xmiroslav - your payment is $3000, I believe - are you able to apply for the job? |
@sophiepintoraetz Accepted the upwork offer. |
@sophiepintoraetz Applied for the job |
Moving back to weekly now that payment/hiring has been issued. |
@0xmiroslav and @PauloGasparSv - please can you complete the steps in this comment here and close the issue once you've done so? |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result
As payment method is removed, the popup should also dismiss
Actual Result
The payment method is removed but the popup is not removed and even allowing to enter password.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.58-3
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
Notes/Photos/Videos:
Screen.Recording.2023-01-24.at.11.03.12.PM.mov
Recording.77.mp4
Expensify/Expensify Issue URL:
Issue reported by: @abdulrahuman5196
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1674584214326729
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: