Skip to content

Commit 54b420c

Browse files
fix: zero accounts rate
1 parent 8a252c6 commit 54b420c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/StartupProgress/Firedancer/Snapshot/SnapshotBarsCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ export function AccountsRate({ cumulativeAccounts }: AccountsRateProps) {
8787
}, [phase, reset]);
8888

8989
const value = useMemo(() => {
90+
// Possible to have no rate due to only having a single point
91+
if (cumulativeAccounts != null && accountsPerSecond == null) return "0";
9092
if (accountsPerSecond == null) return;
9193
return compactSingleDecimalFormatter.format(accountsPerSecond);
92-
}, [accountsPerSecond]);
94+
}, [accountsPerSecond, cumulativeAccounts]);
9395

9496
return (
9597
<div className={styles.accountsRate}>

0 commit comments

Comments
 (0)