Skip to content

Commit

Permalink
Only query 25 events
Browse files Browse the repository at this point in the history
  • Loading branch information
CRBl69 authored and xbtmatt committed Dec 2, 2024
1 parent 6e3b5f0 commit 9272050
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/typescript/frontend/src/app/market/[market]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ interface EmojicoinPageProps {
searchParams: {};
}

const EVENTS_ON_PAGE_LOAD = 25;

export async function generateMetadata({ params }: EmojicoinPageProps): Promise<Metadata> {
const { market: marketSlug } = params;
const names = pathToEmojiNames(marketSlug);
Expand Down Expand Up @@ -74,8 +76,8 @@ const EmojicoinPage = async (params: EmojicoinPageProps) => {
const marketAddress = deriveEmojicoinPublisherAddress({ emojis });

const [chats, swaps, marketView] = await Promise.all([
fetchChatEvents({ marketID }),
fetchSwapEvents({ marketID }),
fetchChatEvents({ marketID, pageSize: EVENTS_ON_PAGE_LOAD }),
fetchSwapEvents({ marketID, pageSize: EVENTS_ON_PAGE_LOAD }),
wrappedCachedContractMarketView(marketAddress.toString()),
]);

Expand Down

0 comments on commit 9272050

Please sign in to comment.