From cdbc9f25cbfb21794504571132788970e980f8f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 19:04:33 +0000 Subject: [PATCH] fix: convert zap amounts from millisats to sats in NIP-10 chat The zap amount display in NIP-10 thread chats was showing millisats instead of sats. Fixed by dividing the amount by 1000 before display, consistent with how zap amounts are displayed elsewhere in the app. The getZapAmount helper from applesauce returns millisats per NIP-57 spec, so the display layer needs to convert to sats for readability. --- src/components/ChatViewer.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index b62d872..1a6cd47 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -329,9 +329,12 @@ const MessageItem = memo(function MessageItem({ /> - {(message.metadata?.zapAmount || 0).toLocaleString("en", { - notation: "compact", - })} + {((message.metadata?.zapAmount || 0) / 1000).toLocaleString( + "en", + { + notation: "compact", + }, + )} {message.metadata?.zapRecipient && (