Skip to content

fix(hooks): reset pagination cursors synchronously when the query changes - #300

Merged
RaceeyXo merged 2 commits into
RaceeyXo:devfrom
QueenColly:fix/225-pagination-cursors-sync
Sep 1, 2026
Merged

fix(hooks): reset pagination cursors synchronously when the query changes#300
RaceeyXo merged 2 commits into
RaceeyXo:devfrom
QueenColly:fix/225-pagination-cursors-sync

Conversation

@QueenColly

Copy link
Copy Markdown
Contributor

Closes #225

Summary
Resolves race conditions and misattributed payment normalizations caused by loose ref-based pagination cursors persisting across query parameter changes.

Changes Proposed

  • Collapsed nextRef, prevRef, hasNext, and hasPrev into a unified reducer state keyed by queryKey.
  • fetchNext and fetchPrev now refuse to execute if state.queryKey !== currentQueryKey.
  • Removed unsafe ! non-null assertions in normalizePayment. Records are now safely normalized against the address they were explicitly requested for.
  • Added cross-account cursor regression tests utilizing testnet addresses.

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@QueenColly Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RaceeyXo
RaceeyXo merged commit da4d93b into RaceeyXo:dev Sep 1, 2026
1 of 4 checks passed
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.

fix(hooks): reset pagination cursors synchronously when the query changes

2 participants