Skip to content

Commit 33a977d

Browse files
NateIsernclaude
andcommitted
feat(tx-list): show total output amount (FAIR) in the /tx feed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 931bf3e commit 33a977d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/components/transactions-content.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ export function TransactionsContent() {
159159
</div>
160160

161161
<div className="flex shrink-0 flex-col items-end gap-0.5 text-xs">
162+
{typeof tx.amount === 'number' ? (
163+
<span className="font-semibold tabular-nums text-foreground">
164+
{tx.amount.toLocaleString(undefined, {
165+
maximumFractionDigits: 8,
166+
})}{' '}
167+
FAIR
168+
</span>
169+
) : null}
162170
{tx.blockHeight !== null ? (
163171
<Link
164172
to={`/block/${tx.blockHeight}`}

src/hooks/use-recent-transactions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export interface RecentTransaction {
99
unconfirmed: boolean
1010
size?: number
1111
fee?: number
12+
/** Total output value (FAIR). Provided by the /api/transactions feed. */
13+
amount?: number
1214
}
1315

1416
export interface RecentTransactionsData {

0 commit comments

Comments
 (0)