Skip to content

Commit cedb4d0

Browse files
authored
Add missing NEW label (#1428)
1 parent 8ebe721 commit cedb4d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortForm/OpenShortForm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { PrimaryStat } from "src/ui/base/components/PrimaryStat";
2121
import { formatBalance } from "src/ui/base/formatting/formatBalance";
2222
import { useNumericInput } from "src/ui/base/hooks/useNumericInput";
2323
import { TransactionView } from "src/ui/hyperdrive/TransactionView";
24+
import { useIsNewPool } from "src/ui/hyperdrive/hooks/useIsNewPool";
2425
import { usePoolInfo } from "src/ui/hyperdrive/hooks/usePoolInfo";
2526
import { useCurrentLongPrice } from "src/ui/hyperdrive/longs/hooks/useCurrentLongPrice";
2627
import { OpenShortPreview } from "src/ui/hyperdrive/shorts/OpenShortPreview/OpenShortPreview";
@@ -66,6 +67,7 @@ export function OpenShortForm({
6667
chainId: hyperdrive.chainId,
6768
hyperdriveAddress: hyperdrive.address,
6869
});
70+
const isNewPool = useIsNewPool({ hyperdrive });
6971
const { balance: baseTokenBalance } = useTokenBalance({
7072
account,
7173
tokenAddress: baseToken.address,
@@ -399,7 +401,7 @@ export function OpenShortForm({
399401
vaultRateStatus === "success" && vaultRate ? (
400402
<>
401403
{appConfig.yieldSources[hyperdrive.yieldSource].shortName} @{" "}
402-
{vaultRate.formatted || 0} APY
404+
{isNewPool ? "✨New✨" : `${vaultRate.formatted} APY`}
403405
</>
404406
) : (
405407
<Skeleton className="w-42 h-8" />

0 commit comments

Comments
 (0)