diff --git a/src/components/liquidityPositions/currentStatus.tsx b/src/components/liquidityPositions/currentStatus.tsx index 4e940e2f..93a2a4e7 100644 --- a/src/components/liquidityPositions/currentStatus.tsx +++ b/src/components/liquidityPositions/currentStatus.tsx @@ -136,18 +136,18 @@ const CurrentLPStatus = ({ nftId, position }: CurrentLPStatusProps) => { const p: BigNumber = fromBaseUnit( position!.phi!.component!.p!.lo, position!.phi!.component!.p!.hi, - asset1Token.decimals + asset2Token.decimals ); const q: BigNumber = fromBaseUnit( position!.phi!.component!.q!.lo, position!.phi!.component!.q!.hi, - asset2Token.decimals + asset1Token.decimals ); return ( <> - + {nftId}
diff --git a/src/constants/tokenConstants.ts b/src/constants/tokenConstants.ts index a4365514..9416d399 100644 --- a/src/constants/tokenConstants.ts +++ b/src/constants/tokenConstants.ts @@ -12,6 +12,26 @@ export const tokenConfigMapOnInner: { [key: string]: Token } = { inner: "KeqcLzNx9qSH5+lcJHBB9KNW+YPrBk5dKzvPMiypahA=", imagePath: "/assets/icons/penumbra.png", }, + "6KBVsPINa8gWSHhfH+kAFJC4afEJA3EtuB2HyCqJUws=": { + decimals: 0, + symbol: "cube", + inner: "6KBVsPINa8gWSHhfH+kAFJC4afEJA3EtuB2HyCqJUws=", + }, + "reum7wQmk/owgvGMWMZn/6RFPV24zIKq3W6In/WwZgg=": { + decimals: 18, + symbol: "test_usd", + inner: "reum7wQmk/owgvGMWMZn/6RFPV24zIKq3W6In/WwZgg=", + }, + "HW2Eq3UZVSBttoUwUi/MUtE7rr2UU7/UH500byp7OAc=": { + decimals: 6, + symbol: "gm", + inner: "HW2Eq3UZVSBttoUwUi/MUtE7rr2UU7/UH500byp7OAc=", + }, + "nwPDkQq3OvLnBwGTD+nmv1Ifb2GEmFCgNHrU++9BsRE=": { + decimals: 6, + symbol: "gn", + inner: "nwPDkQq3OvLnBwGTD+nmv1Ifb2GEmFCgNHrU++9BsRE=", + }, }; // Recreate from tokenConfigMapOnInner to not have to redefine the same data diff --git a/src/pages/tradingPairs/index.tsx b/src/pages/tradingPairs/index.tsx new file mode 100644 index 00000000..bf8f17dd --- /dev/null +++ b/src/pages/tradingPairs/index.tsx @@ -0,0 +1,41 @@ +// pages/tradingPairs/index.tsx + +import React, { useEffect, useRef, useState } from "react"; +import { useRouter } from "next/router"; +import Layout from "../../components/layout"; +import { + VStack, + Text, + Spinner, + Center, + Box, + HStack, + Input, + Button, +} from "@chakra-ui/react"; +import { useSearchParams } from "next/navigation"; + +export default function TradingPairs() { + const searchParams = useSearchParams(); + const token1 = searchParams.get("token1")?.toLocaleLowerCase(); + const token2 = searchParams.get("token2")?.toLocaleLowerCase(); + + if (!token1 || !token2) { + return ( + +
+ token1 or token2 url argument missing. +
+
+ ); + } + + + return ( + +
+ {`${token1} ${token2}`} +
+
+ ); +}