-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] [$1000] iOS: Paypal.me payment method disappears when deleting a PayPal user name offline #22064
Comments
Triggered auto assignment to @sophiepintoraetz ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01424c2ea7e73e9df8 |
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 - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Paypal.me payment method disappears when deleting a PayPal user name offline What is the root cause of that problem?Its happening because of mixing onyx merge and set methods. We can see the error in the console after following the reproduction method and going online. The doc also mentions not to mix both the methods. As a result of mixing both the methods, seems like the set method which is supposed to remove the key gets ignored. Also when the user is online and he tries to delete the Paypal.me method, we are setting the
but in the code we have the following optimistic data Lines 535 to 541 in c0ece67
We can see that the onyxMethod and value is not matching with the API response. Because of wrong optimistic data, the list is getting filtered here App/src/pages/settings/Payments/PaymentMethodList.js Lines 149 to 154 in c0ece67
pendingAction is set to CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE . Even after the user coming online and the API being successful, the wrong data still lies in the Onyx store and the set method is ignored resulting in stale data in onyx store and the above filter removes it always. Also on a side-note, the value set here Lines 544 to 550 in d8e6cdf
null in the response we are setting it as {}
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Paypal.me payment method disappears when deleting a PayPal user name offline What is the root cause of that problem?
Unfortunately, we use ![]() Actually, we use Lines 542 to 550 in c0ece67
What changes do you think we should make in order to solve the problem?Solution 1We can also use Soluciton 2I check we hide add payment method button in offline mode for the Debit card and Bank accounts we can also hide it for What alternative solutions did you explore? (Optional)Hide payment method for |
@asadath1395 Thanks for the proposal. Your RCA is correct. The first solution would work but it's basically a revert of #17903 which will reintroduce #17795. The second solution is not clear i.e. what data should we work with and which method? |
@manjesh-yadav Thanks for the proposal. Your RCA is correct. The first solution (same note as above ^) it's a revert of #17903 which will reintroduce #17795. We would still need to fix #17795 if we go with the revert approach. The second solution does not seem much relevant here, how would that fix the root cause, we would still be using two different Onyx methods. |
@pradeepmdk Thanks for the proposal. Your RCA is correct. Your suggested solution makes sense but it's hard to maintain every object key. I think we should clear the object root directly instead of clearing each key separately. This may require some data restructure. |
@s77rt yes. we can use the root key for this. so that we can just define undefined the root key. |
@s77rt This seems like an issue in the library. There is already an issue opened Expensify/react-native-onyx#266 |
@pradeepmdk Can you please elaborate how would that work? Merging an empty object seems to be a noop. |
@asadath1395 I'm not sure we are looking at the same issue. That issue is about order inconsistency while this one is about the SET method not taking effect at all and we get a thrown error. I think we should try to avoid mixing the methods for now as mixed methods (for same key) does not seem to be supported (it's more like limitation than a bug). |
@s77rt I thought it will work... but still merging with object only. because when come to online two more api call happen Alternative Solutionon delete success instead of set we can use merge with some key for identifying for API is success ex: Onyx.connect({ |
@pradeepmdk Thanks for the update. I don't think the alternative solution is something that we should do, it looks too hacky. |
Not overdue. Still looking for proposals... |
@s77rt ![]() |
@sophiepintoraetz We are still looking for more proposals here. |
Had a discussion here https://expensify.slack.com/archives/C01GTK53T8Q/p1689031771678159 where we encountered a similar onyx problem. I think we may just hold for Expensify/react-native-onyx#266 but I'm not sure if that would actually fix the issue. Yet seems a safe call. cc @neil-marcellini |
@s77rt In the latest code we are facing new issue delete is not happing.when offline to online |
@pradeepmdk It could be related to the same issue. The onyx SET does not seem to take effect. |
@s77rt - so is your recommendation to hold or solicit more proposals or do both? |
@sophiepintoraetz Let's hold for Expensify/react-native-onyx#266 |
Still holding. |
Still holding. |
Still on hold |
Still holding |
Still on hold. Expensify/react-native-onyx#266 |
I think PayPal going to deprecate #26368 |
Great spot - thanks @pradeepmdk |
Closing, we are deprecating Paypal. |
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:
Paypal.me payment method should be there
Actual Result:
Paypal.me payment method is not there
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.35-5
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: Any additional supporting documentation
RPReplay_Final1687804398.MP4
PayPall.0107.mp4
Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687805526273609
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: