Skip to content

Comments

feat: add getV4MultiAccountTransactionsInfiniteQueryOptions#8002

Draft
n3ps wants to merge 2 commits intomainfrom
n3ps/transactions-query
Draft

feat: add getV4MultiAccountTransactionsInfiniteQueryOptions#8002
n3ps wants to merge 2 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 (cursor/after/before) from the query key so it remains stable across all pages. Only filter/sort params that affect which data is returned are included.
  • Runtime pagination via pageParam: The queryFn accepts pageParam (provided by React Query) and maps it to the cursor API parameter, rather than closing over a fixed cursor value.

Extension consumption:

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

useInfiniteQuery({
  ...base,
  select: myCustomTransform,
  enabled: someCondition,
  refetchInterval: 15_000,
});

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

@n3ps n3ps force-pushed the n3ps/transactions-query branch from ef1cc66 to 6345d35 Compare February 20, 2026 04:59
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.

1 participant