From 81bc406587b3df28c1a2b643e30c0f788249ece0 Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Mon, 29 Jul 2024 10:42:03 -0400 Subject: [PATCH] dashboard: fix guardian filtering --- dashboard/src/components/Main.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/src/components/Main.tsx b/dashboard/src/components/Main.tsx index c7580e0f..cec78d7f 100644 --- a/dashboard/src/components/Main.tsx +++ b/dashboard/src/components/Main.tsx @@ -2,6 +2,7 @@ import { GitHub, ReceiptLongOutlined, SyncAltOutlined } from '@mui/icons-materia import { AppBar, Box, Button, Hidden, IconButton, Toolbar, Typography } from '@mui/material'; import { contracts } from '@wormhole-foundation/sdk-base'; import { NavLink, Route, Switch, useLocation } from 'react-router-dom'; +import { useCurrentEnvironment } from '../contexts/NetworkContext'; import useChainHeartbeats from '../hooks/useChainHeartbeats'; import useGetGuardianSet from '../hooks/useGetGuardianSet'; import useHeartbeats from '../hooks/useHeartbeats'; @@ -88,9 +89,10 @@ function NavLinks() { } function Main() { + const env = useCurrentEnvironment(); const [, currentGuardianSet] = useGetGuardianSet( 'Ethereum', - contracts.coreBridge('Mainnet', 'Ethereum') + contracts.coreBridge(env, 'Ethereum') ); const heartbeats = useHeartbeats(currentGuardianSet); const chainIdsToHeartbeats = useChainHeartbeats(heartbeats);