bug: ignore zapperPubkey for forward zaps

This commit is contained in:
2023-04-05 12:36:12 +01:00
parent 5944cfd918
commit 8be0c7dd3d
3 changed files with 7 additions and 5 deletions

View File

@ -114,9 +114,10 @@ export default function Note(props: NoteProps) {
);
const zaps = useMemo(() => {
const sortedZaps = getReactions(related, ev.id, EventKind.ZapReceipt)
.map(parseZap)
.filter(z => z.valid && z.sender !== ev.pubkey);
.map(a => parseZap(a, ev))
.filter(z => z.valid);
sortedZaps.sort((a, b) => b.amount - a.amount);
console.debug(sortedZaps);
return sortedZaps;
}, [related]);
const totalReactions = positive.length + negative.length + reposts.length + zaps.length;