diff --git a/src/components/ReactionsModal/ReactionsModal.tsx b/src/components/ReactionsModal/ReactionsModal.tsx index 459869b..1bdbed2 100644 --- a/src/components/ReactionsModal/ReactionsModal.tsx +++ b/src/components/ReactionsModal/ReactionsModal.tsx @@ -8,7 +8,7 @@ import { Kind } from '../../constants'; import { ReactionStats } from '../../contexts/AppContext'; import { hookForDev } from '../../lib/devTools'; import { hexToNpub } from '../../lib/keys'; -import { getEventReactions } from '../../lib/notes'; +import { getEventReactions, getEventZaps } from '../../lib/notes'; import { truncateNumber, truncateNumber2 } from '../../lib/notifications'; import { subscribeTo } from '../../sockets'; import { userName } from '../../stores/profile'; @@ -178,7 +178,8 @@ const ReactionsModal: Component<{ }); setIsFetching(() => true); - getEventReactions(props.noteId, Kind.Zap, subId, offset); + getEventZaps(props.noteId, subId, 20, offset); + // getEventReactions(props.noteId, Kind.Zap, subId, offset); }; const getReposts = (offset = 0) => { diff --git a/src/lib/notes.tsx b/src/lib/notes.tsx index 8999384..aeae4fb 100644 --- a/src/lib/notes.tsx +++ b/src/lib/notes.tsx @@ -547,3 +547,12 @@ export const getEventReactions = (eventId: string, kind: number, subid: string, {cache: ["event_actions", { event_id: eventId, kind, limit: 20, offset }]}, ])); }; + + +export const getEventZaps = (eventId: string, subid: string, limit: number, offset = 0) => { + sendMessage(JSON.stringify([ + "REQ", + subid, + {cache: ["event_zaps_by_satszapped", { event_id: eventId, limit, offset }]}, + ])); +};