Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions src/components/pages/wallet/transactions/all-transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,23 +293,30 @@ function TransactionRow({
<TableRow style={{ backgroundColor: "none" }} className="hover:bg-muted/50">
<TableCell className="align-top py-4">
<div className="flex flex-col gap-1.5 min-w-0">
{/* Lead with the human-meaningful label (fall back to direction so
on-chain-only rows are never identified by a bare hash). */}
<div className="text-sm font-medium text-foreground break-words line-clamp-2">
{dbTransaction?.description ??
certificatesInfo?.[0]?.label ??
(transaction.inputs.some(
(i) => i.address === appWallet.address,
)
? "Sent"
: "Received")}
</div>
<span className="text-xs text-muted-foreground">
{dateToFormatted(new Date(transaction.tx.block_time * 1000))}
</span>
{/* Hash demoted to a quiet mono link. */}
<LinkCardanoscan
url={`transaction/${transaction.hash}`}
className="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors group"
className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors group"
>
<span className="font-mono text-xs truncate">
{transaction.hash.substring(0, 8)}...{transaction.hash.slice(-8)}
<span className="font-mono">
{getFirstAndLast(transaction.hash, 8, 8)}
</span>
<ArrowUpRight className="h-3.5 w-3.5 flex-shrink-0 opacity-60 group-hover:opacity-100 transition-opacity" />
<ArrowUpRight className="h-3 w-3 flex-shrink-0 opacity-60 group-hover:opacity-100 transition-opacity" />
</LinkCardanoscan>
<span className="text-xs text-muted-foreground">
{dateToFormatted(new Date(transaction.tx.block_time * 1000))}
</span>
{dbTransaction && (
<div className="text-sm font-medium break-words line-clamp-2">
{dbTransaction.description}
</div>
)}
{certificatesInfo && certificatesInfo.length > 0 && (
<div className="flex flex-wrap gap-1.5 mt-2">
{certificatesInfo.map((certInfo: CertificateInfo, idx: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,29 +220,32 @@ function TransactionCard({
<div className="rounded-lg border p-4 space-y-3 bg-card">
<div className="flex items-start justify-between gap-2">
<div className="flex-1 min-w-0">
{/* Lead with the human label (fall back to direction). */}
<div className="text-sm font-medium text-foreground break-words">
{dbTransaction?.description ??
(transaction.inputs.some(
(i: { address: string }) => i.address === appWallet.address,
)
? "Sent"
: "Received")}
</div>
<div className="text-xs text-muted-foreground mt-0.5">
{dateToFormatted(new Date(transaction.tx.block_time * 1000))}
</div>
{/* Hash demoted to a quiet mono link. */}
<LinkCardanoscan
url={`transaction/${transaction.hash}`}
className="inline-flex items-center gap-1 text-sm font-medium hover:underline break-all"
className="mt-1 inline-flex items-center gap-1 font-mono text-xs text-muted-foreground hover:text-foreground"
>
<span className="break-all">
{transaction.hash.substring(0, 8)}...
{transaction.hash.slice(-8)}
</span>
<span>{getFirstAndLast(transaction.hash, 8, 8)}</span>
<ArrowUpRight className="h-3 w-3 flex-shrink-0" />
</LinkCardanoscan>
<div className="text-xs text-muted-foreground mt-1">
{dateToFormatted(new Date(transaction.tx.block_time * 1000))}
</div>
</div>
<div className="flex-shrink-0">
<RowAction transaction={transaction} appWallet={appWallet} />
</div>
</div>

{dbTransaction && (
<div className="text-sm break-words">{dbTransaction.description}</div>
)}


<div className="space-y-2">{outputList}</div>

{certificatesList && certificatesList.length > 0 && (
Expand Down
Loading