diff --git a/src/components/WalletViewer.tsx b/src/components/WalletViewer.tsx index 6cff579..b780c50 100644 --- a/src/components/WalletViewer.tsx +++ b/src/components/WalletViewer.tsx @@ -50,8 +50,6 @@ import { import ConnectWalletDialog from "./ConnectWalletDialog"; import { RelayLink } from "@/components/nostr/RelayLink"; import { parseZapRequest } from "@/lib/wallet-utils"; -import { useProfile } from "@/hooks/useProfile"; -import { getDisplayName } from "@/lib/nostr-utils"; import { Zap } from "lucide-react"; import { useNostrEvent } from "@/hooks/useNostrEvent"; import { KindRenderer } from "./nostr/kinds"; @@ -310,9 +308,6 @@ function ZapTransactionDetail({ transaction }: { transaction: Transaction }) { function TransactionLabel({ transaction }: { transaction: Transaction }) { const zapInfo = parseZapRequest(transaction); - // Call hooks unconditionally (before conditional rendering) - const profile = useProfile(zapInfo?.sender); - // Not a zap - use original description or default label if (!zapInfo) { return ( @@ -323,24 +318,20 @@ function TransactionLabel({ transaction }: { transaction: Transaction }) { ); } - // It's a zap! Show username + message preview - const displayName = getDisplayName(zapInfo.sender, profile); + // It's a zap! Show username + message on one line return (
-
- {displayName} +
+ {zapInfo.message && ( - <> - : - - - - + + + )}
@@ -1201,12 +1192,12 @@ export default function WalletViewer() { {/* Transaction Detail Dialog */} - + Transaction Details -
+
{selectedTransaction && (