diff --git a/apps/web/src/api/TokensApi.ts b/apps/web/src/api/TokensApi.ts index fcb6db2c..3456e728 100644 --- a/apps/web/src/api/TokensApi.ts +++ b/apps/web/src/api/TokensApi.ts @@ -15,6 +15,7 @@ export default { itemsCount?: string, marketCap?: string, name?: string, + fiat_value?: string, ): Promise => { const rpcUrl = getRpcUrl(network); const params = filterParams([ @@ -24,6 +25,7 @@ export default { { key: "items_count", value: itemsCount }, { key: "market_cap", value: marketCap }, { key: "name", value: name }, + { key: "fiat_value", value: fiat_value }, ]); const res = await fetch(`${rpcUrl}/${TOKENS_URL}${params}`); @@ -38,6 +40,7 @@ export interface TokenNextPageParamsProps { items_count: string; market_cap?: string; name?: string; + fiat_value?: string; } export interface TokenQueryParamsProps extends TokenNextPageParamsProps { diff --git a/apps/web/src/pages/tokens/index.tsx b/apps/web/src/pages/tokens/index.tsx index 8004afa0..3bcc16cc 100644 --- a/apps/web/src/pages/tokens/index.tsx +++ b/apps/web/src/pages/tokens/index.tsx @@ -43,6 +43,7 @@ function TokenPagination({ is_name_null: nextPageParams.is_name_null, market_cap: nextPageParams.market_cap ?? "null", name: nextPageParams.name, + fiat_value: nextPageParams.fiat_value ?? "null", } : undefined } @@ -107,7 +108,8 @@ export async function getServerSideProps( !isNumeric(params?.holder_count as string) || !isAlphanumeric(params?.is_name_null as string) || !isNumeric(params?.items_count as string) || - !isAlphanumeric(params?.market_cap as string); + !isAlphanumeric(params?.market_cap as string) || + !isAlphanumeric(params?.fiat_value as string); try { // Fetch data from external API @@ -121,6 +123,7 @@ export async function getServerSideProps( params?.items_count as string, params?.market_cap as string, params?.name as string, + params?.fiat_value as string, ); const data = { tokens: txs.items,