diff --git a/apps/hyperdrive-trading/src/ui/base/components/NonIdealState.tsx b/apps/hyperdrive-trading/src/ui/base/components/NonIdealState.tsx new file mode 100644 index 000000000..18659d1cb --- /dev/null +++ b/apps/hyperdrive-trading/src/ui/base/components/NonIdealState.tsx @@ -0,0 +1,9 @@ +import { ReactElement } from "react"; + +export function NonIdealState(): ReactElement { + return ( +
+

Nothing to show.

+
+ ); +} diff --git a/apps/hyperdrive-trading/src/ui/base/components/tables/GridTableHeader.tsx b/apps/hyperdrive-trading/src/ui/base/components/tables/GridTableHeader.tsx index 6b1b7ed3f..0fb4f74f8 100644 --- a/apps/hyperdrive-trading/src/ui/base/components/tables/GridTableHeader.tsx +++ b/apps/hyperdrive-trading/src/ui/base/components/tables/GridTableHeader.tsx @@ -15,7 +15,7 @@ export function GridTableHeader({ return (
*]:text-ellipsis [&>*]:p-4", + "grid auto-cols-fr grid-flow-col items-center rounded-t-md [&>*]:text-ellipsis [&>*]:p-4", className, )} > diff --git a/apps/hyperdrive-trading/src/ui/base/components/tables/SortableGridTable.tsx b/apps/hyperdrive-trading/src/ui/base/components/tables/SortableGridTable.tsx index 4349de057..f8788c59a 100644 --- a/apps/hyperdrive-trading/src/ui/base/components/tables/SortableGridTable.tsx +++ b/apps/hyperdrive-trading/src/ui/base/components/tables/SortableGridTable.tsx @@ -1,6 +1,7 @@ import classNames from "classnames"; import { ReactElement, ReactNode, useState } from "react"; import Skeleton from "react-loading-skeleton"; +import { NonIdealState } from "src/ui/base/components/NonIdealState"; import { GridTableHeader } from "src/ui/base/components/tables/GridTableHeader"; import { GridTableRow } from "src/ui/base/components/tables/GridTableRow"; import { GridTableRowLink } from "src/ui/base/components/tables/GridTableRowLink"; @@ -53,7 +54,7 @@ export function SortableGridTable({ rows, onSort, headingRowClassName, - emptyTableElement = , + emptyTableElement = , showSkeleton, bodyRowClassName, defaultSortOptions, @@ -204,14 +205,6 @@ function nextSortDirection( } } -function DefaultEmptyTableElement() { - return ( -
-

Nothing to show.

-
- ); -} - interface CellWithTooltipProps { content: ReactNode; tooltip: string; @@ -223,7 +216,9 @@ export function CellWithTooltip({ }: CellWithTooltipProps): ReactElement { return ( - {content} + + {content} + ); } diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx index 1786d67f8..6aa4cd0d0 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx @@ -129,6 +129,7 @@ export function OpenLongForm({ />
+

Please note: 1 hy{hyperdrive.baseToken.symbol} is always worth 1{" "} {hyperdrive.baseToken.symbol} at maturity, however its value may diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongModalButton/OpenLongModalButton.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongModalButton/OpenLongModalButton.tsx index 14788df30..863889f20 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongModalButton/OpenLongModalButton.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongModalButton/OpenLongModalButton.tsx @@ -37,9 +37,9 @@ export function OpenLongModalButton({ {hyperdrive.baseToken.symbol}

- 1 hy{hyperdrive.baseToken.symbol} is worth 1{" "} - {hyperdrive.baseToken.symbol} at maturity, giving you a - predictable fixed rate yield. + 1 hy{hyperdrive.baseToken.symbol} is always worth 1{" "} + {hyperdrive.baseToken.symbol} at maturity. It's a predictable + fixed rate yield.

diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongPreview/OpenLongPreview.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongPreview/OpenLongPreview.tsx index 7c0d20ec6..3c0627f92 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongPreview/OpenLongPreview.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongPreview/OpenLongPreview.tsx @@ -31,21 +31,40 @@ export function OpenLongPreview({

Fixed rate

-

- {long.bondAmount > 0 - ? `${calculateAnnualizedPercentageChange({ +

+ {long.bondAmount > 0 ? ( + <> +

+ {long.bondAmount > long.baseAmountPaid ? "+" : ""} + {long.baseAmountPaid + ? `${formatBalance({ + balance: long.bondAmount - long.baseAmountPaid, + decimals: hyperdrive.baseToken.decimals, + places: 4, + })} ${hyperdrive.baseToken.symbol}` + : undefined} +
+ {calculateAnnualizedPercentageChange({ amountBefore: long.baseAmountPaid, amountAfter: long.bondAmount, days: numDays, - })}` - : "0"} + })} + + ) : ( + "0" + )} % APR

Matures in

- 7 days, {new Date(Number(long.maturity * 1000n)).toLocaleDateString()} + {convertMillisecondsToDays(hyperdrive.termLengthMS)} days,{" "} + {new Date(Number(long.maturity * 1000n)).toLocaleDateString()}

diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm.tsx index 791a776bd..f4f29f5dc 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm.tsx @@ -1,10 +1,9 @@ -import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; import { useConnectModal } from "@rainbow-me/rainbowkit"; import { ReactElement } from "react"; -import { Link } from "react-router-dom"; import { Hyperdrive } from "src/appconfig/types"; import { MAX_UINT256 } from "src/base/constants"; import { parseUnits } from "src/base/parseUnits"; +import { Well } from "src/ui/base/components/Well/Well"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useNumericInput } from "src/ui/base/hooks/useNumericInput"; import { AddLiquidityPreview } from "src/ui/hyperdrive/lp/AddLiquidityPreview/AddLiquidityPreview"; @@ -71,22 +70,8 @@ export function AddLiquidityForm({ }); return ( -
-
-
Add liquidity
-
-

Earn trading fees when users open long or shorts

- - Learn More - - -
-
+
+
Add liquidity
{/* New Position Section */} -
-
Position preview
- -
+
+ +
+ Preview transaction + +
+
- {account ? ( - needsApproval ? ( - // Approval button - +

+ Note: You can withdraw liquidity at any time. If you're backing + open positions, you'll receive Withdrawal Shares for later + redemption. +

+ + {account ? ( + needsApproval ? ( + // Approval button + + ) : ( + // Trade button + + ) ) : ( - // Trade button - ) - ) : ( - - )} + )} +
); } diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityPreview/AddLiquidityPreview.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityPreview/AddLiquidityPreview.tsx index 7d09ca61b..36695afec 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityPreview/AddLiquidityPreview.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityPreview/AddLiquidityPreview.tsx @@ -1,6 +1,5 @@ import { ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; -import { Pill } from "src/ui/base/components/Pill"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; interface AddLiquidityPreviewProps { @@ -13,25 +12,17 @@ export function AddLiquidityPreview({ lpShares, }: AddLiquidityPreviewProps): ReactElement { return ( -
-
-
{hyperdrive.name}
- LP -
- -
-
-

LP Shares Received

-

- {formatBalance({ - balance: lpShares, - decimals: hyperdrive.baseToken.decimals, - places: 4, - includeCommas: false, - })}{" "} - LP -

-
+
+
+

You receive

+

+ {formatBalance({ + balance: lpShares, + decimals: hyperdrive.baseToken.decimals, + places: 4, + })}{" "} + LP +

); diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesForm/RedeemWithdrawalSharesForm.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesForm/RedeemWithdrawalSharesForm.tsx index 29b17cd8a..ad20f4ab3 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesForm/RedeemWithdrawalSharesForm.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesForm/RedeemWithdrawalSharesForm.tsx @@ -1,7 +1,7 @@ import { ConnectButton } from "@rainbow-me/rainbowkit"; import { MouseEvent, ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; -import { Stat } from "src/ui/base/components/Stat"; +import { Well } from "src/ui/base/components/Well/Well"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useNumericInput } from "src/ui/base/hooks/useNumericInput"; import { usePreviewRedeemWithdrawalShares } from "src/ui/hyperdrive/lp/hooks/usePreviewRedeemWithdrawalShares"; @@ -55,65 +55,70 @@ export function RedeemWithdrawalSharesForm({ }); return ( -
+
{/* Amount to close section */} -
-
Amount to redeem
- setAmount(newAmount)} - /> -
+
Redeem withdrawal shares
+ setAmount(newAmount)} + /> {/* You receive Section */} -
- -
+
+ +
+ Preview transaction +
+
+

You receive

+

+ {baseAmountOut + ? `${formatBalance({ + balance: baseAmountOut, + decimals: baseDecimals, + places: 8, + })} ${baseSymbol}` + : ""} +

+
+
+
+
- {account ? ( - - ) : ( - - )} + {account ? ( + + ) : ( + + )} +
); } diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesModalButton/RedeemWithdrawalSharesModalButton.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesModalButton/RedeemWithdrawalSharesModalButton.tsx index dc3af5e02..0119a8ddd 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesModalButton/RedeemWithdrawalSharesModalButton.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RedeemWithdrawalSharesModalButton/RedeemWithdrawalSharesModalButton.tsx @@ -28,13 +28,10 @@ export function RedeemWithdrawalSharesModalButton({ onClick={closeModal} > -

- Redeem withdrawal shares -

- {/* Amount to close section */} -
-
Amount to remove
- setAmount(newAmount)} - /> -
+
+
Remove liquidity
+ setAmount(newAmount)} + /> {/* You receive Section */} -
-

You receive

-

{formattedBaseAmountOut}

-
-
-

Withdrawal shares

-

{formattedWithdrawalSharesOut}

-
+
+ +
+ Preview transaction +
+
+

You receive

+

+ {formattedBaseAmountOut || 0} {hyperdrive.baseToken.symbol} +

+
+ +
+

Withdrawal shares

+

{formattedWithdrawalSharesOut || 0} Shares

+
+
+
+
- {account ? ( - - ) : ( - - )} + {account ? ( + + ) : ( + + )} +
); } diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RemoveLiquidityModalButton/RemoveLiquidityModalButton.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RemoveLiquidityModalButton/RemoveLiquidityModalButton.tsx index 32ef3542a..620be4d16 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RemoveLiquidityModalButton/RemoveLiquidityModalButton.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/RemoveLiquidityModalButton/RemoveLiquidityModalButton.tsx @@ -28,13 +28,10 @@ export function RemoveLiquidityModalButton({ onClick={closeModal} > -

- Remove liquidity -

-
-
Open a short
-
-

Earn yield by shorting the current bond price

- - Learn More - - -
-
+
+
Short hy{market.baseToken.symbol}
setAmount(newAmount)} /> {/* New Position Section */} -
-
Position preview
- -
+
+ +
+ Preview transaction + +
+
- {account ? ( - needsApproval ? ( - // Approval button - +

+ Please note: When you short hy{market.baseToken.symbol} you earn the + variable rate on the equivalent amount of {market.baseToken.symbol}{" "} + deposited in the yield source. +

+ + {account ? ( + needsApproval ? ( + // Approval button + + ) : ( + // Open short button + + ) ) : ( - // Open short button - ) - ) : ( - - )} + )} +
); } diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortPreview/OpenShortPreview.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortPreview/OpenShortPreview.tsx index 8ba02e13f..3a6a94900 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortPreview/OpenShortPreview.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortPreview/OpenShortPreview.tsx @@ -1,84 +1,56 @@ import { ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; import { convertMillisecondsToDays } from "src/base/convertMillisecondsToDays"; -import { Pill } from "src/ui/base/components/Pill"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; interface OpenShortPreviewProps { market: Hyperdrive; costBasis?: bigint; - amountShort: bigint; - expiryDate: Date; + shortSize?: bigint; } export function OpenShortPreview({ market, costBasis, - amountShort, - expiryDate, + shortSize, }: OpenShortPreviewProps): ReactElement { return ( -
-
-
{market.name}
- - Short - +
+
+

Short size

+

+ {shortSize + ? `${formatBalance({ + balance: shortSize, + decimals: market.baseToken.decimals, + places: 6, + })}` + : "0"}{" "} + hy{market.baseToken.symbol} +

+
+
+

You pay

+

+ {costBasis + ? `${formatBalance({ + balance: costBasis, + decimals: market.baseToken.decimals, + places: 6, + })}` + : "0"}{" "} + {market.baseToken.symbol} +

-
-
-

Cost Basis

-

- {costBasis - ? `${formatBalance({ - balance: costBasis, - decimals: market.baseToken.decimals, - places: 6, - includeCommas: false, - })} ${market.baseToken.symbol}` - : "0"} -

-
- -
-

Amount

-

- {formatBalance({ - balance: amountShort, - decimals: market.baseToken.decimals, - places: 6, - })} -

-
- -
-

Term Length

-

- {convertMillisecondsToDays(market.termLengthMS)} days -

-
- -
-

Matures

-

- {expiryDate.toLocaleDateString()} -

-
- -
-

Exposure

-

- {!!costBasis && amountShort > 0n && costBasis > 0n - ? `${formatBalance({ - balance: amountShort / costBasis, - decimals: market.baseToken.decimals, - places: 4, - includeCommas: false, - })}x` - : "0"} -

-
+
+

Matures in

+

+ {convertMillisecondsToDays(market.termLengthMS)} days,{" "} + {new Date( + Date.now() + Number(market.termLengthMS), + ).toLocaleDateString()} +

); diff --git a/apps/hyperdrive-trading/src/ui/onboarding/FAQ/FAQ.tsx b/apps/hyperdrive-trading/src/ui/onboarding/FAQ/FAQ.tsx index de49aec69..f06ab5dda 100644 --- a/apps/hyperdrive-trading/src/ui/onboarding/FAQ/FAQ.tsx +++ b/apps/hyperdrive-trading/src/ui/onboarding/FAQ/FAQ.tsx @@ -5,7 +5,7 @@ export function FAQ(): ReactElement { return (
- FAQ + FAQ
How can I get fixed rates?} diff --git a/apps/hyperdrive-trading/src/ui/portfolio/ClosedLongsTable/ClosedLongsTable.tsx b/apps/hyperdrive-trading/src/ui/portfolio/ClosedLongsTable/ClosedLongsTable.tsx index d0abcfcb0..7724973fa 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/ClosedLongsTable/ClosedLongsTable.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/ClosedLongsTable/ClosedLongsTable.tsx @@ -10,6 +10,7 @@ import { import { ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; import { makeQueryKey } from "src/base/makeQueryKey"; +import { NonIdealState } from "src/ui/base/components/NonIdealState"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useReadHyperdrive } from "src/ui/hyperdrive/hooks/useReadHyperdrive"; import { useAccount } from "wagmi"; @@ -124,6 +125,7 @@ export function ClosedLongsTable({ })} + {!closedLongs?.length ? : null}
); } diff --git a/apps/hyperdrive-trading/src/ui/portfolio/ClosedLpTable/ClosedLpTable.tsx b/apps/hyperdrive-trading/src/ui/portfolio/ClosedLpTable/ClosedLpTable.tsx index e313cc511..0dcbf7197 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/ClosedLpTable/ClosedLpTable.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/ClosedLpTable/ClosedLpTable.tsx @@ -36,10 +36,7 @@ export function ClosedLpTable({ ...closedLpShares.map( ({ lpAmount, baseAmount, closedTimestamp, withdrawalShareAmount }) => { return [ - + LP , @@ -89,7 +86,7 @@ export function ClosedLpTable({ })} ${hyperdrive.baseToken.symbol}`} , - 0 + N/A , {new Date(Number(redeemedTimestamp * 1000n)).toLocaleDateString()} @@ -102,12 +99,12 @@ export function ClosedLpTable({ return ( ), @@ -115,7 +112,7 @@ export function ClosedLpTable({ { cell: ( ), @@ -124,15 +121,15 @@ export function ClosedLpTable({ cell: ( ), }, { cell: ( ), }, diff --git a/apps/hyperdrive-trading/src/ui/portfolio/ClosedShortsTable/ClosedShortsTable.tsx b/apps/hyperdrive-trading/src/ui/portfolio/ClosedShortsTable/ClosedShortsTable.tsx index f2dc6f65a..f0f67ca72 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/ClosedShortsTable/ClosedShortsTable.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/ClosedShortsTable/ClosedShortsTable.tsx @@ -9,6 +9,7 @@ import { import { ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; import { makeQueryKey } from "src/base/makeQueryKey"; +import { NonIdealState } from "src/ui/base/components/NonIdealState"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useReadHyperdrive } from "src/ui/hyperdrive/hooks/useReadHyperdrive"; import { useAccount } from "wagmi"; @@ -123,6 +124,7 @@ export function ClosedShortsTable({ })} + {!closedShorts?.length ? : null}
); } diff --git a/apps/hyperdrive-trading/src/ui/portfolio/OpenLongsTable/OpenLongsTable.tsx b/apps/hyperdrive-trading/src/ui/portfolio/OpenLongsTable/OpenLongsTable.tsx index fff32be58..3f91e00e4 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/OpenLongsTable/OpenLongsTable.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/OpenLongsTable/OpenLongsTable.tsx @@ -13,6 +13,7 @@ import { Hyperdrive } from "src/appconfig/types"; import { calculateAnnualizedPercentageChange } from "src/base/calculateAnnualizedPercentageChange"; import { convertMillisecondsToDays } from "src/base/convertMillisecondsToDays"; import { makeQueryKey } from "src/base/makeQueryKey"; +import { NonIdealState } from "src/ui/base/components/NonIdealState"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useReadHyperdrive } from "src/ui/hyperdrive/hooks/useReadHyperdrive"; import { CloseLongModalButton } from "src/ui/hyperdrive/longs/CloseLongModalButton/CloseLongModalButton"; @@ -165,6 +166,7 @@ export function OpenLongsTable({ })} + {!longs?.length ? : null}
); } diff --git a/apps/hyperdrive-trading/src/ui/portfolio/OpenLpPosition/OpenLpPosition.tsx b/apps/hyperdrive-trading/src/ui/portfolio/OpenLpPosition/OpenLpPosition.tsx index f13e075e6..f08248d4f 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/OpenLpPosition/OpenLpPosition.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/OpenLpPosition/OpenLpPosition.tsx @@ -15,7 +15,6 @@ import { usePreviewRemoveLiquidity } from "src/ui/hyperdrive/lp/hooks/usePreview import { useWithdrawalShares } from "src/ui/hyperdrive/lp/hooks/useWithdrawalShares"; import { RedeemWithdrawalSharesModalButton } from "src/ui/hyperdrive/lp/RedeemWithdrawalSharesModalButton/RedeemWithdrawalSharesModalButton"; import { RemoveLiquidityModalButton } from "src/ui/hyperdrive/lp/RemoveLiquidityModalButton/RemoveLiquidityModalButton"; -import { formatUnits } from "viem"; import { useAccount } from "wagmi"; interface OpenOrdersTableProps { @@ -57,10 +56,14 @@ export function OpenLpPosition({ const rows: Row[] = []; if (lpShares) { rows.push([ - + LP , - formatUnits(lpShares, (hyperdrive as Hyperdrive).baseToken.decimals), + formatBalance({ + balance: lpShares, + decimals: (hyperdrive as Hyperdrive).baseToken.decimals, + places: 4, + }), {!!poolInfo ? ( `${formatBalance({ @@ -69,6 +72,7 @@ export function OpenLpPosition({ hyperdrive.baseToken.decimals, ), decimals: hyperdrive.baseToken.decimals, + places: 4, })} ${hyperdrive.baseToken.symbol}` ) : ( @@ -138,8 +142,8 @@ export function OpenLpPosition({ return ( ), }, @@ -174,6 +178,7 @@ export function OpenLpPosition({ /> ), }, + { cell:
}, ]} rows={rows} showSkeleton={ diff --git a/apps/hyperdrive-trading/src/ui/portfolio/OpenShortsTable/OpenShortsTable.tsx b/apps/hyperdrive-trading/src/ui/portfolio/OpenShortsTable/OpenShortsTable.tsx index a2c020946..cdab8c45f 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/OpenShortsTable/OpenShortsTable.tsx +++ b/apps/hyperdrive-trading/src/ui/portfolio/OpenShortsTable/OpenShortsTable.tsx @@ -12,6 +12,7 @@ import { ReactElement } from "react"; import { Hyperdrive } from "src/appconfig/types"; import { makeQueryKey } from "src/base/makeQueryKey"; import { parseUnits } from "src/base/parseUnits"; +import { NonIdealState } from "src/ui/base/components/NonIdealState"; import { formatBalance } from "src/ui/base/formatting/formatBalance"; import { useReadHyperdrive } from "src/ui/hyperdrive/hooks/useReadHyperdrive"; import { @@ -175,6 +176,7 @@ export function OpenShortsTable({ })} + {!shorts?.length ? : null}
); } diff --git a/apps/hyperdrive-trading/src/ui/trade/TradeBody/TradeBody.tsx b/apps/hyperdrive-trading/src/ui/trade/TradeBody/TradeBody.tsx index 33888d687..a5926d895 100644 --- a/apps/hyperdrive-trading/src/ui/trade/TradeBody/TradeBody.tsx +++ b/apps/hyperdrive-trading/src/ui/trade/TradeBody/TradeBody.tsx @@ -47,7 +47,7 @@ export function TradeBody({ hyperdrive }: PositionsTableProps): ReactElement {
- Transactions + Transactions {transactionData && ( )}