From 4f90f627c4a57ae8515c2c0bfd4f227e8a92c69a Mon Sep 17 00:00:00 2001 From: im-adithya Date: Thu, 22 Jan 2026 14:52:14 +0530 Subject: [PATCH] fix: align transaction state handling with Hub --- components/TransactionItem.tsx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/components/TransactionItem.tsx b/components/TransactionItem.tsx index 8abd0de..a067d28 100644 --- a/components/TransactionItem.tsx +++ b/components/TransactionItem.tsx @@ -24,22 +24,22 @@ export function TransactionItem({ tx }: Props) { ); const typeStateText = - tx.state === "failed" - ? "Failed" - : tx.state === "pending" - ? "Sending" - : tx.type === "outgoing" - ? "Sent" - : "Received"; + tx.type === "incoming" + ? "Received" + : tx.state === "settled" + ? "Sent" + : tx.state === "pending" + ? "Sending" + : "Failed"; const Icon = - tx.state === "failed" - ? FailedTransactionIcon - : tx.state === "pending" - ? PendingTransactionIcon - : tx.type === "outgoing" - ? SentTransactionIcon - : ReceivedTransactionIcon; + tx.type === "incoming" + ? ReceivedTransactionIcon + : tx.state === "settled" + ? SentTransactionIcon + : tx.state === "pending" + ? PendingTransactionIcon + : FailedTransactionIcon; const pubkey = tx.metadata?.nostr?.pubkey; const npub = pubkey ? safeNpubEncode(pubkey) : undefined;