Skip to content

Commit 6fcbfdd

Browse files
authored
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
1 parent 1f0d97a commit 6fcbfdd

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/pages/dex/index.page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ export default function DexPage({
109109
}
110110

111111
export async function getServerSideProps(
112-
context: GetServerSidePropsContext
112+
context: GetServerSidePropsContext,
113113
): Promise<GetServerSidePropsResult<DexPageProps>> {
114114
const api = getWhaleApiClient(context);
115115

116116
const next = CursorPagination.getNext(context);
117117
const items = await api.poolpairs.list(100, next);
118118
const sorted = items.filter(
119-
(poolpair) => !poolpair.displaySymbol.includes("/")
119+
(poolpair) =>
120+
!poolpair.displaySymbol.includes("/") &&
121+
!poolpair.symbol.includes("BURN"),
120122
);
121123

122124
return {
@@ -141,7 +143,7 @@ export async function getServerSideProps(
141143
while (poolpairsResponse.hasNext) {
142144
poolpairsResponse = await api.poolpairs.list(
143145
200,
144-
poolpairsResponse.nextToken
146+
poolpairsResponse.nextToken,
145147
);
146148
poolpairs.push(...poolpairsResponse);
147149
}

src/pages/tokens/index.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function TokensPage({
4646
}
4747

4848
export async function getServerSideProps(
49-
context: GetServerSidePropsContext
49+
context: GetServerSidePropsContext,
5050
): Promise<GetServerSidePropsResult<TokensPageData>> {
5151
const next = CursorPagination.getNext(context);
5252
const items = await getWhaleApiClient(context).tokens.list(20, next);

0 commit comments

Comments
 (0)