-
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: use paging to fail all pending user transactions #2825
Conversation
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.
Works great! Thanks for such a quick turnaround 👍
Screen.Recording.2024-08-01.at.23.58.17.mov
getTransactionsByUserAndStatus( | ||
from: { eq: $userAddress } | ||
status: PENDING | ||
nextToken: $nextToken | ||
) { |
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.
You could also pass an increased limit
here to override the default 100 items
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.
Tested this and can confirm it's working as expected.
The patch to the create data script added the pending tx's correctly:
I also disabled the failPendingTransactions
method, so that I can view the pending tx's in the UI:
And once I re-enabled it, the all changed their status to Failed
, as expected:
Nicely done Chris!
Description
There was a problem with pending transactions not being put into a failed state properly. This usually happens when a proper user wallet is initialized.
This PR uses Apollo paging to put all pending transactions into a failed state.
Testing
create-data
script.create-data
scriptDiffs
Changes 🏗