From b4d797faf1d052d84778d8804b356f32bfbdbaf3 Mon Sep 17 00:00:00 2001 From: Kieran Date: Sat, 18 Feb 2023 22:42:47 +0000 Subject: [PATCH] bug: summary anonymous zap --- packages/app/src/Element/Zap.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/app/src/Element/Zap.tsx b/packages/app/src/Element/Zap.tsx index f2467b62..c0c04996 100644 --- a/packages/app/src/Element/Zap.tsx +++ b/packages/app/src/Element/Zap.tsx @@ -1,6 +1,6 @@ import "./Zap.css"; import { useMemo } from "react"; -import { FormattedMessage } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import { useSelector } from "react-redux"; import { decode as invoiceDecode } from "light-bolt11-decoder"; import { bytesToHex } from "@noble/hashes/utils"; @@ -123,6 +123,7 @@ interface ZapsSummaryProps { } export const ZapsSummary = ({ zaps }: ZapsSummaryProps) => { + const { formatMessage } = useIntl(); const sortedZaps = useMemo(() => { const pub = [...zaps.filter(z => z.zapper && z.valid)]; const priv = [...zaps.filter(z => !z.zapper && z.valid)]; @@ -135,14 +136,20 @@ export const ZapsSummary = ({ zaps }: ZapsSummaryProps) => { } const [topZap, ...restZaps] = sortedZaps; - const { zapper, amount } = topZap; + const { zapper, amount, anonZap } = topZap; return (
{amount && (
- {zapper && } + {zapper && ( + + )} {restZaps.length > 0 && }{" "}