diff --git a/.gitignore b/.gitignore
index 33a7761f..bdaa4c5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
+.codexrc
# dependencies
/node_modules
@@ -54,4 +54,4 @@ next-env.d.ts
CLAUDE.md
FULLAUTO_CONTEXT.md
-.claude/settings.local.json
\ No newline at end of file
+.claude/settings.local.json
diff --git a/src/components/shared/estimated-value-tooltip.tsx b/src/components/shared/estimated-value-tooltip.tsx
new file mode 100644
index 00000000..b7e28256
--- /dev/null
+++ b/src/components/shared/estimated-value-tooltip.tsx
@@ -0,0 +1,32 @@
+import type { ReactNode } from 'react';
+import { Tooltip } from '@/components/ui/tooltip';
+import { TooltipContent } from '@/components/shared/tooltip-content';
+import { cn } from '@/utils/components';
+
+type EstimatedValueTooltipProps = {
+ children: ReactNode;
+ isEstimated: boolean;
+ detail?: string;
+ className?: string;
+};
+
+const DEFAULT_DETAIL = 'This USD value is estimated using a hardcoded price.';
+
+export function EstimatedValueTooltip({ children, isEstimated, detail = DEFAULT_DETAIL, className }: EstimatedValueTooltipProps) {
+ if (!isEstimated) {
+ return <>{children}>;
+ }
+
+ return (
+
Available Liquidity
-{formatReadable(Number(market.state.liquidityAssetsUsd))}
+
+
Utilization Rate
diff --git a/src/features/markets/components/table/market-table-body.tsx b/src/features/markets/components/table/market-table-body.tsx index e86f16a6..bc70cafc 100644 --- a/src/features/markets/components/table/market-table-body.tsx +++ b/src/features/markets/components/table/market-table-body.tsx @@ -182,6 +182,7 @@ export function MarketTableBody({ currentEntries, expandedRowId, setExpandedRowI assets={item.state.supplyAssets} decimals={item.loanAsset.decimals} symbol={item.loanAsset.symbol} + isEstimated={!item.hasUSDPrice} /> )} {columnVisibility.totalBorrow && ( @@ -191,6 +192,7 @@ export function MarketTableBody({ currentEntries, expandedRowId, setExpandedRowI assets={item.state.borrowAssets} decimals={item.loanAsset.decimals} symbol={item.loanAsset.symbol} + isEstimated={!item.hasUSDPrice} /> )} {columnVisibility.liquidity && ( @@ -200,6 +202,7 @@ export function MarketTableBody({ currentEntries, expandedRowId, setExpandedRowI assets={item.state.liquidityAssets} decimals={item.loanAsset.decimals} symbol={item.loanAsset.symbol} + isEstimated={!item.hasUSDPrice} /> )} {columnVisibility.supplyAPY && ( diff --git a/src/features/markets/components/table/market-table-utils.tsx b/src/features/markets/components/table/market-table-utils.tsx index 51e090c1..9c2a547b 100644 --- a/src/features/markets/components/table/market-table-utils.tsx +++ b/src/features/markets/components/table/market-table-utils.tsx @@ -1,6 +1,7 @@ import { ArrowDownIcon, ArrowUpIcon, ExternalLinkIcon } from '@radix-ui/react-icons'; import { TableHead, TableCell } from '@/components/ui/table'; import { TokenIcon } from '@/components/shared/token-icon'; +import { EstimatedValueTooltip } from '@/components/shared/estimated-value-tooltip'; import { formatBalance, formatReadable } from '@/utils/balance'; import { getAssetURL } from '@/utils/external'; import type { SortColumn } from '../constants'; @@ -68,12 +69,14 @@ export function TDTotalSupplyOrBorrow({ assets, decimals, symbol, + isEstimated = false, }: { dataLabel: string; assetsUSD: number; assets: string; decimals: number; symbol: string; + isEstimated?: boolean; }) { return (${`${formatReadable(Number(assetsUSD))} `}
+
+
{`${formatReadable(formatBalance(assets, decimals))} ${symbol}`}