diff --git a/src/Element/Zap.tsx b/src/Element/Zap.tsx index 7756bf1b..36bbc162 100644 --- a/src/Element/Zap.tsx +++ b/src/Element/Zap.tsx @@ -1,11 +1,10 @@ import "./Zap.css"; -import { useMemo } from "react"; import { useSelector } from "react-redux"; // @ts-expect-error import { decode as invoiceDecode } from "light-bolt11-decoder"; import { bytesToHex } from "@noble/hashes/utils"; -import { sha256 } from "Util"; +//import { sha256 } from "Util"; import { formatShort } from "Number"; import { HexKey, TaggedRawEvent } from "Nostr"; import Event from "Nostr/Event"; @@ -20,16 +19,6 @@ function findTag(e: TaggedRawEvent, tag: string) { return maybeTag && maybeTag[1] } -type Section = { - name: string - value?: any - letters?: string -} - -function getSection(sections: Section[], name: string) { - return sections.find((s) => s.name === name) -} - function getInvoice(zap: TaggedRawEvent) { const bolt11 = findTag(zap, 'bolt11') const decoded = invoiceDecode(bolt11) @@ -83,7 +72,7 @@ export function parseZap(zap: TaggedRawEvent): ParsedZap { } } -const Zap = ({ zap }: { zap: ParsedZap }) => { +const Zap = ({ zap, showZapped = true }: { zap: ParsedZap, showZapped?: boolean }) => { const { amount, content, zapper, valid, p } = zap const pubKey = useSelector((s: RootState) => s.login.publicKey) @@ -91,7 +80,7 @@ const Zap = ({ zap }: { zap: ParsedZap }) => {