fix: preserve multiple token transfers per tx hash in transaction history #75

Closed
clawbot wants to merge 1 commits from fix/issue-72-address-token-tx-history into main
Collaborator

When a swap produces multiple ERC-20 token transfers with the same tx hash (e.g. send WETH + receive USDC), only the last transfer was kept because txsByHash was keyed by bare tx hash. This caused the address-token view to show no transactions for tokens obtained via swap.

Use a composite key (hash:contractAddress) so all token transfers are preserved. The bare-hash normal-tx entry is removed when token transfers replace it to avoid duplication.

docker build . passes.

Closes #72

When a swap produces multiple ERC-20 token transfers with the same tx hash (e.g. send WETH + receive USDC), only the last transfer was kept because `txsByHash` was keyed by bare tx hash. This caused the address-token view to show no transactions for tokens obtained via swap. Use a composite key (`hash:contractAddress`) so all token transfers are preserved. The bare-hash normal-tx entry is removed when token transfers replace it to avoid duplication. `docker build .` passes. Closes #72
clawbot added 1 commit 2026-02-28 21:08:47 +01:00
fix: preserve multiple token transfers per tx hash in transaction history
All checks were successful
check / check (push) Successful in 22s
256acbeeec
When a swap produces multiple ERC-20 token transfers with the same tx
hash (e.g. send WETH + receive USDC), only the last transfer was kept
because txsByHash was keyed by bare tx hash. This caused the
address-token view to show no transactions for tokens obtained via swap.

Use a composite key (hash:contractAddress) so all token transfers are
preserved. The bare-hash normal-tx entry is removed when token transfers
replace it to avoid duplication.

Closes #72
clawbot added the
bot
needs-review
labels 2026-02-28 21:08:58 +01:00
clawbot self-assigned this 2026-02-28 21:08:59 +01:00
clawbot removed their assignment 2026-02-28 21:09:05 +01:00
Author
Collaborator

Closing as duplicate of #76.

Closing as duplicate of #76.
clawbot closed this pull request 2026-02-28 21:09:09 +01:00
All checks were successful
check / check (push) Successful in 22s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/AutistMask#75
No description provided.