-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix: Dont show failed expenditures in actions list #4217
Conversation
8f6aa74
to
15fca70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job unpicking this issue! The solution seems to work well, had no rogue actions making their way to the activity feed.
I tested staged payments, advanced payments and split payments, all working as expected.
Rejecting the last transaction:
https://github.com/user-attachments/assets/83e42dd3-07e3-4953-b782-ae9783b89217
Testing split payments:
https://github.com/user-attachments/assets/f4684148-50e6-4122-962c-f57ee293543e
The UserHub issue appears to be on master so approving as it is unrelated to this issue - also noticed this when no items in the list.
@rdig I've added a fix for the user hamburger menu in #4216 as I've noticed this issue too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work @davecreaser 🙌
Everything works as expected
Accepted all transactions for a Staged payment
Screen.Recording.2025-02-03.at.12.14.34.mov
Accepted the first transaction and rejected the second
Screen.Recording.2025-02-03.at.12.15.11.mov
Accepted first 2 transactions and rejected the 3rd one
Screen.Recording.2025-02-03.at.12.15.49.mov
Tried also for Advanced payment
to accept the 1st transaction and reject the 2nd
Screen.Recording.2025-02-03.at.12.17.12.mov
And tested also for Split payment
to accept the 1st transaction and reject the 2nd
Screen.Recording.2025-02-03.at.12.17.45.mov
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now!
Description
So this was a bit of a tricky bug (original ticket: [Staged payment] Invalid staged payment data is displayed on the dashboard when a Metamask transaction is canceled #4033) which is basically caused by the action being created and put in the actions list a little prematurely. If a user cancels the final transaction in metamask, or if the final transaction just fails, then the action is not properly created and gets into a weird state where it is technically created but shouldn't really be seen by the user or show in the lists.
This PR aims to fix this by not setting showInActionsList by default to true for createExpenditure actions. The saga will instead set it to true once it has finished all of the necessary transactions. There's also a couple of very small cleanup things tacked on.
There's also a couple of changes in PRs in other repos so please also review them:
Testing
Diffs
Changes 🏗
Resolves #4033