From 108554e7424d4df532ced05caa7b17d33e2c3beb Mon Sep 17 00:00:00 2001 From: achalvs Date: Thu, 15 Jan 2026 08:16:00 +0000 Subject: [PATCH] fix(explorer): add block_timestamp to /api/address endpoint This adds the block_timestamp field to transaction data returned by the /api/address endpoint. The app's activity heatmap relies on this field to display transaction timestamps correctly. Without this field, all transactions appear in the most recent bucket since the timestamp defaults to undefined. --- apps/explorer/src/routes/api/address/$address.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/explorer/src/routes/api/address/$address.ts b/apps/explorer/src/routes/api/address/$address.ts index a286ab6b..9a95c1d6 100644 --- a/apps/explorer/src/routes/api/address/$address.ts +++ b/apps/explorer/src/routes/api/address/$address.ts @@ -177,12 +177,13 @@ export const Route = createFileRoute('/api/address/$address')({ : paginatedHashes // Fetch full tx data only for the final set of hashes - let transactions: RpcTransaction[] = [] + let transactions: (RpcTransaction & { timestamp?: string })[] = [] if (finalHashes.length > 0) { const txDataResult = await QB.selectFrom('txs') .select([ 'hash', 'block_num', + 'block_timestamp', 'from', 'to', 'value', @@ -227,7 +228,8 @@ export const Route = createFileRoute('/api/address/$address')({ v: '0x0', r: '0x0', s: '0x0', - } as RpcTransaction + timestamp: row.block_timestamp ? String(row.block_timestamp) : undefined, + } as RpcTransaction & { timestamp?: string } }) }