diff --git a/apps/scan/app/[locale]/HomeContent.tsx b/apps/scan/app/[locale]/HomeContent.tsx index 309ce6b..20da290 100644 --- a/apps/scan/app/[locale]/HomeContent.tsx +++ b/apps/scan/app/[locale]/HomeContent.tsx @@ -21,7 +21,7 @@ import { LiveTicker } from "@/components/home/LiveTicker"; import { TxChart14d } from "@/components/home/TxChart14d"; import { FreshnessChip } from "@/components/common/FreshnessChip"; import { useNetwork, useNetworkFromQuery } from "@/lib/network-context"; -import { useStats, useBlocks, useTransactions, useChainPerformance, useMempool, useCurrentEpoch, useChainStatus } from "@/lib/hooks"; +import { useStats, useBlocks, useTransactions, useChainPerformance, useMempool, useCurrentEpoch } from "@/lib/hooks"; import { useLatestBlock, useLatestFinalized } from "@/lib/ws"; import { formatNumber, formatSRX, toMillis } from "@/lib/format"; import { validateAndResolveSearch } from "@/lib/search-validate"; @@ -122,7 +122,6 @@ export function HomeContent({ initial }: { initial: HomeBundle }) { const { data: performance, loading: perfLoading } = useChainPerformance(network, perfRange, initial.performance); const { data: mempool } = useMempool(network, initial.mempool); const { data: epoch } = useCurrentEpoch(network, initial.epoch); - const { data: chainStatus } = useChainStatus(network, initial.status); const latestPerf = performance?.points?.[performance.points.length - 1]; // Show the actual recent block cadence from the latest blocks. The @@ -262,7 +261,7 @@ export function HomeContent({ initial }: { initial: HomeBundle }) { return ( <> - + {(isChainIdle || chainUnreachable) && (
diff --git a/apps/scan/components/home/LiveTicker.tsx b/apps/scan/components/home/LiveTicker.tsx index ea6ad65..07b609c 100644 --- a/apps/scan/components/home/LiveTicker.tsx +++ b/apps/scan/components/home/LiveTicker.tsx @@ -1,6 +1,6 @@ "use client"; -import type { ChainInfo, EpochInfo, ChainStatus } from "@/lib/api"; +import type { ChainInfo, EpochInfo } from "@/lib/api"; import { formatSRX } from "@/lib/format"; interface LiveTickerProps { @@ -8,22 +8,12 @@ interface LiveTickerProps { blockTime: string; network: "mainnet" | "testnet"; epoch?: EpochInfo | null; - status?: ChainStatus | null; -} - -function formatUptime(seconds: number): string { - if (seconds < 60) return `${Math.floor(seconds)}s`; - const m = seconds / 60; - if (m < 60) return `${Math.floor(m)}m`; - const h = m / 60; - if (h < 24) return `${h.toFixed(1)}h`; - return `${(h / 24).toFixed(1)}d`; } // DECISION: Etherscan/Solscan keep a thin "live" strip above the hero showing the numbers // that matter most — block height, tx pulse, gas/block time. One horizontal scroll-safe // rail of mono key/value pairs. Draws the eye before the big serif title. -export function LiveTicker({ stats, blockTime, network, epoch, status }: LiveTickerProps) { +export function LiveTicker({ stats, blockTime, network, epoch }: LiveTickerProps) { const epochProgress = epoch && epoch.end_height > epoch.start_height && stats ? Math.min(100, Math.max(0, ((stats.height - epoch.start_height) / (epoch.end_height - epoch.start_height)) * 100)) : null; @@ -38,7 +28,6 @@ export function LiveTicker({ stats, blockTime, network, epoch, status }: LiveTic { label: "Circulating", value: stats ? formatSRX(stats.total_minted_srx) : "—" }, { label: "Tokens", value: stats ? String(stats.deployed_tokens) : "—" }, { label: "Reward", value: stats ? `${stats.next_block_reward_srx} SRX` : "—" }, - { label: "Node uptime", value: status ? formatUptime(status.uptime_seconds) : "—" }, ]; // Single static rail. Used to be a marquee with two duplicated copies for