Skip to content

fix(explorer): lowercase address in tx-only history query#1096

Open
oxJean wants to merge 1 commit into
tempoxyz:mainfrom
oxJean:fix/address-history-checksum-address
Open

fix(explorer): lowercase address in tx-only history query#1096
oxJean wants to merge 1 commit into
tempoxyz:mainfrom
oxJean:fix/address-history-checksum-address

Conversation

@oxJean

@oxJean oxJean commented Jun 23, 2026

Copy link
Copy Markdown

fix(explorer): lowercase address in tx-only history query

summary

The transaction-only address history page returns an empty list for any
address that contains a hex letter (a–f), even when that address clearly has
transactions. The summary counter on the same page shows a non-zero number,
so the UI ends up claiming "N transactions" above an empty table.

root cause

fetchAddressTxOnlyHistoryPageWithJoins built its WHERE clause directly from
params.address:

txs."from" = '0xAbC...'   -- checksummed, mixed case

Indexed addresses are persisted lowercased (see indexedAddress), and every
other query in this module — including the companion count query
fetchAddressDirectTxCount — normalizes through indexedAddress(params.address)
first. This one query was the only path that compared against the raw,
EIP-55-checksummed value coming out of zAddress(), so the equality never
matched a stored row.

fix

Normalize once at the top of the function and use the lowercased value in the
WHERE builder, matching the rest of the file:

const address = indexedAddress(params.address)
const whereForSide = (side) => [`txs."${side}" = '${address}'`, ...filters].join(' AND ')

No behavior change for all-lowercase addresses; mixed-case addresses now resolve
their transactions correctly and the list matches the count.

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