Skip to content

feat: add transactions infinite query option#8002

Merged
n3ps merged 6 commits intomainfrom
n3ps/transactions-query
Mar 2, 2026
Merged

feat: add transactions infinite query option#8002
n3ps merged 6 commits intomainfrom
n3ps/transactions-query

Conversation

@n3ps
Copy link
Contributor

@n3ps n3ps commented Feb 20, 2026

Explanation

This PR adds a new getV4MultiAccountTransactionsInfiniteQueryOptions method to AccountsApiClient that is designed specifically for useInfiniteQuery consumers:

  • Stable query key: Excludes pagination params from the query key so it remains stable across all pages.
  • Runtime pagination via pageParam: The queryFn accepts pageParam and maps it to the cursor API parameter, rather than closing over a fixed cursor value.

Extension consumption:

const queryOptions = apiClient.accounts.getV4MultiAccountTransactionsInfiniteQueryOptions({
  accountAddresses: ['eip155:0:0xabc...'],
  networks: ['eip155:1', 'eip155:137'],
  includeTxMetadata: true,
});

useInfiniteQuery({
  ...queryOptions,
  // example:
  select: myCustomTransform,
});

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Low risk: adds a new query-options helper and tests without changing existing transaction fetch behavior; main risk is cache-key semantics for useInfiniteQuery consumers.

Overview
Adds AccountsApiClient.getV4MultiAccountTransactionsInfiniteQueryOptions to produce TanStack useInfiniteQuery-friendly options for the v4 multi-account transactions endpoint, using pageParam as the cursor and a stable queryKey that sorts accountAddresses/networks.

Extends unit tests to validate query key stability and default/override cache timings, and documents the new helper in the core-backend changelog.

Written by Cursor Bugbot for commit a5dcb5a. This will update automatically on new commits. Configure here.

@n3ps n3ps force-pushed the n3ps/transactions-query branch from ef1cc66 to 6345d35 Compare February 20, 2026 04:59
@n3ps n3ps marked this pull request as ready for review February 28, 2026 03:21
@n3ps n3ps requested review from a team as code owners February 28, 2026 03:21
@n3ps n3ps changed the title feat: add getV4MultiAccountTransactionsInfiniteQueryOptions feat: add transactions infinite query option Feb 28, 2026
@n3ps n3ps enabled auto-merge March 2, 2026 04:10
@n3ps n3ps added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit bb4c276 Mar 2, 2026
314 checks passed
@n3ps n3ps deleted the n3ps/transactions-query branch March 2, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants