Skip to content

Key token transfer rows by token id so rows stop surviving pagination - #3632

Merged
tom2drum merged 1 commit into
mainfrom
claude/github-issue-3628-9b69c2
Aug 11, 2026
Merged

Key token transfer rows by token id so rows stop surviving pagination#3632
tom2drum merged 1 commit into
mainfrom
claude/github-issue-3628-9b69c2

Conversation

@tom2drum

Copy link
Copy Markdown
Collaborator

Description

Resolves #3628

An ERC-1155 batch transfer reaches the API as a single log, which the API flattens into one item per transferred token id. Those items share a (transaction_hash, block_hash, log_index) triple, so the React keys built from that triple collided — on OP Sepolia, page 1 of ?type=ERC-1155 held 50 items with only 42 distinct keys.

React tracks pending removals in a key → fiber map where duplicates overwrite each other, so the shadowed fibers are never unmounted. Their rows stayed in the table above the rows of every page that followed, which is the reported symptom. It is also why the pinned rows in the issue screenshot show drifting "N minutes ago" values — each is a leftover row with its own still-running timer.

Token transfer rows are now keyed through a shared getTokenTransferKey, which adds the token id. Applied to the token transfers page (table + mobile list), the address page lists, and the multichain page.

Environment variables

None.

Minimum API version

None.

Breaking or incompatible changes

None.

Additional information

Covered by two specs. TokenTransfersTable.spec.tsx reproduces the reported symptom: it renders a batch-transfer page, swaps in a different page, and asserts that no rows of the old page survive. It fails on the previous key (6 rows instead of 2) and passes now.

Note that this narrows the collision rather than making it impossible. EIP-1155 only requires _ids and _values to have equal length, and OpenZeppelin's ERC1155._update loops over ids without rejecting duplicates, so a batch carrying the same id twice would still collide. No such transfer appears in 600 sampled items across 12 pages. #3631 tracks a generic collision-proof key helper for all lists.

An ERC-1155 batch transfer reaches the API as a single log, which the API
flattens into one item per transferred token id. Those items share a
(transaction_hash, block_hash, log_index) triple, so the React keys built from
that triple collided.

React tracks pending removals in a key -> fiber map where duplicates overwrite
each other, leaving the shadowed fibers unmounted forever: their rows stayed in
the table above the rows of every page that followed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tom2drum tom2drum added the bug Something isn't working label Aug 11, 2026
@tom2drum
tom2drum merged commit fe1b071 into main Aug 11, 2026
12 checks passed
@tom2drum
tom2drum deleted the claude/github-issue-3628-9b69c2 branch August 11, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Token transfers. Transfer pinned to the top of the table during pagination.

1 participant