Skip to content

Commit 4f90f62

Browse files
committed
fix: align transaction state handling with Hub
1 parent 7eeb1f8 commit 4f90f62

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

components/TransactionItem.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ export function TransactionItem({ tx }: Props) {
2424
);
2525

2626
const typeStateText =
27-
tx.state === "failed"
28-
? "Failed"
29-
: tx.state === "pending"
30-
? "Sending"
31-
: tx.type === "outgoing"
32-
? "Sent"
33-
: "Received";
27+
tx.type === "incoming"
28+
? "Received"
29+
: tx.state === "settled"
30+
? "Sent"
31+
: tx.state === "pending"
32+
? "Sending"
33+
: "Failed";
3434

3535
const Icon =
36-
tx.state === "failed"
37-
? FailedTransactionIcon
38-
: tx.state === "pending"
39-
? PendingTransactionIcon
40-
: tx.type === "outgoing"
41-
? SentTransactionIcon
42-
: ReceivedTransactionIcon;
36+
tx.type === "incoming"
37+
? ReceivedTransactionIcon
38+
: tx.state === "settled"
39+
? SentTransactionIcon
40+
: tx.state === "pending"
41+
? PendingTransactionIcon
42+
: FailedTransactionIcon;
4343

4444
const pubkey = tx.metadata?.nostr?.pubkey;
4545
const npub = pubkey ? safeNpubEncode(pubkey) : undefined;

0 commit comments

Comments
 (0)