From 6fcbfdd351e4bdb2ccd4b96542c06b553483edd7 Mon Sep 17 00:00:00 2001 From: Chloe <44501120+chloezxyy@users.noreply.github.com> Date: Thu, 7 Sep 2023 09:03:54 +0800 Subject: [PATCH] fix(ui-ux): filter out burn symbol in DEX table (#1865) * fix(ui-ux): filter out burn symbols * revert filter for tokens page * code cleanup * code cleanup --- src/pages/dex/index.page.tsx | 8 +++++--- src/pages/tokens/index.page.tsx | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/dex/index.page.tsx b/src/pages/dex/index.page.tsx index a5c6029cf..98b29c790 100644 --- a/src/pages/dex/index.page.tsx +++ b/src/pages/dex/index.page.tsx @@ -109,14 +109,16 @@ export default function DexPage({ } export async function getServerSideProps( - context: GetServerSidePropsContext + context: GetServerSidePropsContext, ): Promise> { const api = getWhaleApiClient(context); const next = CursorPagination.getNext(context); const items = await api.poolpairs.list(100, next); const sorted = items.filter( - (poolpair) => !poolpair.displaySymbol.includes("/") + (poolpair) => + !poolpair.displaySymbol.includes("/") && + !poolpair.symbol.includes("BURN"), ); return { @@ -141,7 +143,7 @@ export async function getServerSideProps( while (poolpairsResponse.hasNext) { poolpairsResponse = await api.poolpairs.list( 200, - poolpairsResponse.nextToken + poolpairsResponse.nextToken, ); poolpairs.push(...poolpairsResponse); } diff --git a/src/pages/tokens/index.page.tsx b/src/pages/tokens/index.page.tsx index e7c8f575c..82b16e98a 100644 --- a/src/pages/tokens/index.page.tsx +++ b/src/pages/tokens/index.page.tsx @@ -46,7 +46,7 @@ export default function TokensPage({ } export async function getServerSideProps( - context: GetServerSidePropsContext + context: GetServerSidePropsContext, ): Promise> { const next = CursorPagination.getNext(context); const items = await getWhaleApiClient(context).tokens.list(20, next);