diff --git a/src/components/icons/assets/tokens/XCHF.tsx b/src/components/icons/assets/tokens/XCHF.tsx new file mode 100644 index 000000000..1c3c53a99 --- /dev/null +++ b/src/components/icons/assets/tokens/XCHF.tsx @@ -0,0 +1,18 @@ +import { SVGProps } from "react"; + +export function XCHF(props: SVGProps): JSX.Element { + return ( + + + + + ); +} diff --git a/src/components/icons/assets/tokens/dXCHF.tsx b/src/components/icons/assets/tokens/dXCHF.tsx new file mode 100644 index 000000000..50d4e3ead --- /dev/null +++ b/src/components/icons/assets/tokens/dXCHF.tsx @@ -0,0 +1,18 @@ +import { SVGProps } from "react"; + +export function dXCHF(props: SVGProps): JSX.Element { + return ( + + + + + ); +} diff --git a/src/components/icons/assets/tokens/index.ts b/src/components/icons/assets/tokens/index.ts index 3b20c2036..e439b1c73 100644 --- a/src/components/icons/assets/tokens/index.ts +++ b/src/components/icons/assets/tokens/index.ts @@ -26,6 +26,8 @@ import { dDOT } from "./dDOT"; import { dSOL } from "./dSOL"; import { dMATIC } from "./dMATIC"; import { dSUI } from "./dSUI"; +import { dXCHF } from "./dXCHF"; +import { XCHF } from "./XCHF"; const mapping: Record) => JSX.Element> = { @@ -59,6 +61,8 @@ const mapping: Record) => JSX.Element> = dDOT: dDOT, dSOL: dSOL, dSUI: dSUI, + dXCHF: dXCHF, + XCHF: XCHF, }; // TODO(@defich): move assets into it's own repo where anyone can create pull request into. diff --git a/src/constants/TokenBackedAddress.ts b/src/constants/TokenBackedAddress.ts index 6a8f2624a..939515d0e 100644 --- a/src/constants/TokenBackedAddress.ts +++ b/src/constants/TokenBackedAddress.ts @@ -98,6 +98,13 @@ export const TOKEN_BACKED_ADDRESS: BackedAddress = { address: "12YfgqECReN4fQppa9BDoyGce43F54ZHYotE77mb5SmCBsUk", }, }, + SUI: { + cake: { + link: "https://suiexplorer.com/address/0x072e6de3fc10b1eacbe130127f6baf3111034fc0204f0edd7a1899d8c40a11a5", + address: + "0x072e6de3fc10b1eacbe130127f6baf3111034fc0204f0edd7a1899d8c40a11a5", + }, + }, }; interface TokenBacked { @@ -150,4 +157,8 @@ export const TOKEN_BACKED: TokenBacked[] = [ name: "dDOT", symbol: "DOT", }, + { + name: "dSUI", + symbol: "SUI", + }, ]; diff --git a/src/pages/dex/_components/PoolPairsCards.tsx b/src/pages/dex/_components/PoolPairsCards.tsx index bd39be8ab..a76b27e48 100644 --- a/src/pages/dex/_components/PoolPairsCards.tsx +++ b/src/pages/dex/_components/PoolPairsCards.tsx @@ -70,7 +70,7 @@ export function PoolPairsCards({ sortKey, reverse: sortOrder === "desc", }), - [poolPairsPrices, sortKey, sortOrder] + [poolPairsPrices, sortKey, sortOrder], ); function changeSort(sortType: { @@ -131,7 +131,8 @@ export function PoolPairsCard({ poolPair.displaySymbol.includes("dUSDC") || poolPair.displaySymbol.includes("dBTC") || poolPair.displaySymbol.includes("dETH") || - poolPair.displaySymbol.includes("dEUROC") + poolPair.displaySymbol.includes("dEUROC") || + poolPair.displaySymbol.includes("dXCHF") ? poolPair.displaySymbol : poolPair.tokenA.displaySymbol }`} diff --git a/src/pages/dex/_components/PoolPairsTable.tsx b/src/pages/dex/_components/PoolPairsTable.tsx index 1fa741b7d..56cb0b5b5 100644 --- a/src/pages/dex/_components/PoolPairsTable.tsx +++ b/src/pages/dex/_components/PoolPairsTable.tsx @@ -36,7 +36,7 @@ export function PoolPairsTable({ sortKey, reverse: sortOrder === "desc", }), - [poolPairsPrices, sortKey, sortOrder] + [poolPairsPrices, sortKey, sortOrder], ); function changeSort(key: SortKeys): void { @@ -94,7 +94,8 @@ export function PoolPairsTable({ data.poolPair.displaySymbol.includes("dUSDC") || data.poolPair.displaySymbol.includes("dBTC") || data.poolPair.displaySymbol.includes("dETH") || - data.poolPair.displaySymbol.includes("dEUROC") + data.poolPair.displaySymbol.includes("dEUROC") || + data.poolPair.displaySymbol.includes("dXCHF") ? data.poolPair.displaySymbol : data.poolPair.tokenA.displaySymbol }`, 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/[id].page.tsx b/src/pages/tokens/[id].page.tsx index a4f8a0238..1dccba4be 100644 --- a/src/pages/tokens/[id].page.tsx +++ b/src/pages/tokens/[id].page.tsx @@ -336,6 +336,14 @@ function BackingAddress({ tokenSymbol }: { tokenSymbol: string }): JSX.Element { testId="BackingAddress.DOT" /> ); + case "SUI": + return ( + + ); case "ETH": case "USDC": case "USDT": 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);