From 095fe92cc2c581c2dc4929f2bb8fa800fbe82dcb Mon Sep 17 00:00:00 2001 From: QSchlegel Date: Sat, 13 Jun 2026 13:01:01 +0200 Subject: [PATCH] fix(ux): lead transaction rows with the human label, demote the hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The on-chain history rows (desktop table + mobile cards) led with the raw truncated tx hash — the least human-meaningful field — while the actual description ("Ballot Vote: …") was buried below. Flip the hierarchy to match the pending-tx cards: - primary: the dbTransaction description, or a "Sent"/"Received" fallback (and the cert label on desktop) so rows without a DB record aren't identified by a bare hash. - date below. - hash demoted to a quiet muted mono link with the external-link arrow. Also standardize the hash truncation on getFirstAndLast(hash, 8, 8) (was two different inline substring schemes) and drop the now-redundant standalone description block on mobile. Cardanoscan links, outputs, certs, signers, and the row actions menu are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../wallet/transactions/all-transactions.tsx | 31 ++++++++++++------- .../responsive-transactions-table.tsx | 29 +++++++++-------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/components/pages/wallet/transactions/all-transactions.tsx b/src/components/pages/wallet/transactions/all-transactions.tsx index 20a4f2c9..724b2b63 100644 --- a/src/components/pages/wallet/transactions/all-transactions.tsx +++ b/src/components/pages/wallet/transactions/all-transactions.tsx @@ -293,23 +293,30 @@ function TransactionRow({
+ {/* Lead with the human-meaningful label (fall back to direction so + on-chain-only rows are never identified by a bare hash). */} +
+ {dbTransaction?.description ?? + certificatesInfo?.[0]?.label ?? + (transaction.inputs.some( + (i) => i.address === appWallet.address, + ) + ? "Sent" + : "Received")} +
+ + {dateToFormatted(new Date(transaction.tx.block_time * 1000))} + + {/* Hash demoted to a quiet mono link. */} - - {transaction.hash.substring(0, 8)}...{transaction.hash.slice(-8)} + + {getFirstAndLast(transaction.hash, 8, 8)} - + - - {dateToFormatted(new Date(transaction.tx.block_time * 1000))} - - {dbTransaction && ( -
- {dbTransaction.description} -
- )} {certificatesInfo && certificatesInfo.length > 0 && (
{certificatesInfo.map((certInfo: CertificateInfo, idx: number) => { diff --git a/src/components/pages/wallet/transactions/responsive-transactions-table.tsx b/src/components/pages/wallet/transactions/responsive-transactions-table.tsx index ef316c94..f0e61f48 100644 --- a/src/components/pages/wallet/transactions/responsive-transactions-table.tsx +++ b/src/components/pages/wallet/transactions/responsive-transactions-table.tsx @@ -220,29 +220,32 @@ function TransactionCard({
+ {/* Lead with the human label (fall back to direction). */} +
+ {dbTransaction?.description ?? + (transaction.inputs.some( + (i: { address: string }) => i.address === appWallet.address, + ) + ? "Sent" + : "Received")} +
+
+ {dateToFormatted(new Date(transaction.tx.block_time * 1000))} +
+ {/* Hash demoted to a quiet mono link. */} - - {transaction.hash.substring(0, 8)}... - {transaction.hash.slice(-8)} - + {getFirstAndLast(transaction.hash, 8, 8)} -
- {dateToFormatted(new Date(transaction.tx.block_time * 1000))} -
- - {dbTransaction && ( -
{dbTransaction.description}
- )} - +
{outputList}
{certificatesList && certificatesList.length > 0 && (