From 58019ed8cc82ce204b538e43995fccaa64a1d3cf Mon Sep 17 00:00:00 2001 From: pkxro Date: Sat, 9 Nov 2024 22:25:46 -0500 Subject: [PATCH] nit: add warning of ping api issues (#401) - The network is humming and seeing 0 to 1 slot latency for tx inclusion but there is an issue with statistic reporting. Adding disclaimer until the issue is resolved --------- Co-authored-by: Noah Gundotra --- app/components/LiveTransactionStatsCard.tsx | 18 +++++++++++++++++- app/page.tsx | 5 ++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/components/LiveTransactionStatsCard.tsx b/app/components/LiveTransactionStatsCard.tsx index 07aa9ed4..db3ed4f8 100644 --- a/app/components/LiveTransactionStatsCard.tsx +++ b/app/components/LiveTransactionStatsCard.tsx @@ -39,7 +39,19 @@ export function LiveTransactionStatsCard() {

Live Transaction Stats

+ +
+ Note: We are aware of an issue with ping statistic reporting. Ping statistics may not reflect actual + network performance. Please see{' '} + + validators.app + {' '} + for more information. +
); @@ -273,7 +285,11 @@ function PingStatsCardBody({ series, setSeries }: { series: Series; setSeries: S return ; } - return ; + return ( + <> + + + ); } type StatsNotReadyProps = { error: boolean; retry?: () => void }; diff --git a/app/page.tsx b/app/page.tsx index 4a74b565..60023177 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -71,7 +71,10 @@ function StakingComponent() { const activeStake = React.useMemo(() => { if (voteAccounts && delinquentStake) { - return voteAccounts.current.reduce((prev, current) => prev + current.activatedStake, BigInt(0)) + delinquentStake; + return ( + voteAccounts.current.reduce((prev, current) => prev + current.activatedStake, BigInt(0)) + + delinquentStake + ); } }, [voteAccounts, delinquentStake]);