Skip to content
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

Add support for glob pattern to filter txs by action's type_id in query.transaction.ncTransactions query #89

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 3, 2023

Description

This PR adds support for glob patterns to filter transactions by action's type_id in the query.transaction.ncTransactions query in the TransactionHeadlessQuery.cs file. Currently, users can only filter transactions by exact match of the action type, which requires manual updates whenever the protocol version is upgraded. With this PR, users can use glob patterns, such as transfer_asset*, to filter transactions, making it easier to handle protocol upgrades.

Summary of Changes

  • Added a new argument actionTypeGlobPattern to the ncTransactions query in the TransactionHeadlessQuery.cs file. This argument allows users to filter transactions based on a glob pattern for the action type.
  • Modified the resolve function of the ncTransactions query to use the actionTypeGlobPattern argument. The filtering logic has been updated to support glob patterns instead of exact matches.
  • Ensured that the ListBlocks method still works as expected after the changes. If necessary, the method has been updated to support glob patterns.

Please review and merge this PR. Thank you!

Fixes #87.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/glob-pattern-filtering_1

🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Sweep your software chores
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Support glob pattern to filer txs by action's type_id in query.transaction.ncTransactions query
0 participants