From 11ed758363807e9c49f88227137d675d1b6d1370 Mon Sep 17 00:00:00 2001 From: cpl121 Date: Mon, 18 Mar 2024 10:40:00 +0100 Subject: [PATCH] fix: update network metrics store --- .../shared/lib/core/network/actions/network-polling.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/shared/lib/core/network/actions/network-polling.ts b/packages/shared/lib/core/network/actions/network-polling.ts index dc43f9cc4e8..f190a07f22e 100644 --- a/packages/shared/lib/core/network/actions/network-polling.ts +++ b/packages/shared/lib/core/network/actions/network-polling.ts @@ -1,4 +1,5 @@ import { NETWORK_STATUS_POLL_INTERVAL } from '../constants' +import { getAndUpdateNetworkMetrics } from './getAndUpdateNetworkMetrics' import { getAndUpdateNodeInfo } from './getAndUpdateNodeInfo' let pollInterval: number @@ -8,8 +9,11 @@ let pollInterval: number */ export async function pollNetworkStatus(): Promise { await getAndUpdateNodeInfo() - await getAndUpdateNodeInfo() - pollInterval = window.setInterval(() => void getAndUpdateNodeInfo(), NETWORK_STATUS_POLL_INTERVAL) + await getAndUpdateNetworkMetrics() + pollInterval = window.setInterval(() => { + getAndUpdateNodeInfo() + getAndUpdateNetworkMetrics() + }, NETWORK_STATUS_POLL_INTERVAL) } export function clearNetworkPoll(): void {