mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-03 02:10:55 +00:00
Reactions modal uses zaps sorted by sats API
This commit is contained in:
parent
78b430264e
commit
e359b127a2
@ -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) => {
|
||||
|
@ -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 }]},
|
||||
]));
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user