diff --git a/packages/guardian-prover-health-check-ui/src/app.config.ts b/packages/guardian-prover-health-check-ui/src/app.config.ts index 8a3f22b0a30..32fd72534af 100644 --- a/packages/guardian-prover-health-check-ui/src/app.config.ts +++ b/packages/guardian-prover-health-check-ui/src/app.config.ts @@ -1 +1 @@ -export const configuredNetworks = ['hekla', 'devnet'] +export const configuredNetworks = ['hekla', 'devnet']; diff --git a/packages/guardian-prover-health-check-ui/src/lib/dataFetcher.ts b/packages/guardian-prover-health-check-ui/src/lib/dataFetcher.ts index dfd0a31e1c1..c07bf7faaf9 100644 --- a/packages/guardian-prover-health-check-ui/src/lib/dataFetcher.ts +++ b/packages/guardian-prover-health-check-ui/src/lib/dataFetcher.ts @@ -116,7 +116,7 @@ async function fetchGuardians() { guardian.name = await getPseudonym(guardian.address); - console.log("getting balance for", guardian.name, guardian.id, guardian.address); + console.log('getting balance for', guardian.name, guardian.id, guardian.address); const [status, uptime, balance] = await Promise.all([ fetchLatestGuardianProverHealthCheckFromApi( @@ -125,7 +125,6 @@ async function fetchGuardians() { ), fetchUptimeFromApi(import.meta.env.VITE_GUARDIAN_PROVER_API_URL, guardian.address), publicClient.getBalance({ address: guardian.address as Address }) - ]); guardian.balance = formatEther(balance); @@ -141,7 +140,6 @@ async function fetchGuardians() { guardianProvers.set(updatedGuardians); lastGuardianFetchTimestamp.set(Date.now()); console.log('updatedGuardians', updatedGuardians); - } async function fetchSignedBlockStats() { @@ -188,7 +186,7 @@ async function fetchStats(): Promise { const guardians = get(guardianProvers); const updatedGuardiansPromises = guardians.map(async (guardian) => { - console.log('fetching stats for', guardian.address) + console.log('fetching stats for', guardian.address); const startupDataFetch = fetchStartupDataFromApi( import.meta.env.VITE_GUARDIAN_PROVER_API_URL, guardian.address @@ -210,7 +208,6 @@ async function fetchStats(): Promise { revision: startupData.revision }; - const blockInfo: BlockInfo = { latestL1BlockNumber: nodeInfo.latestL1BlockNumber, latestL2BlockNumber: nodeInfo.latestL2BlockNumber diff --git a/packages/guardian-prover-health-check-ui/src/lib/guardianProver/loadConfiguredGuardians.ts b/packages/guardian-prover-health-check-ui/src/lib/guardianProver/loadConfiguredGuardians.ts index 59794e826c8..84bc70b9483 100644 --- a/packages/guardian-prover-health-check-ui/src/lib/guardianProver/loadConfiguredGuardians.ts +++ b/packages/guardian-prover-health-check-ui/src/lib/guardianProver/loadConfiguredGuardians.ts @@ -1,15 +1,17 @@ -import { configuredNetworks } from "$config"; +import { configuredNetworks } from '$config'; export async function loadGuardians(): Promise<{ [address: string]: string }> { - const network = import.meta.env.VITE_NETWORK_CONFIG; - if (!network) { - throw new Error('Network not configured. Please set VITE_NETWORK_CONFIG in .env file. Currently supported networks: ' + configuredNetworks.join(', ')); - } - const path = `/config/${network}/guardians.json`; - const response = await fetch(path); - if (!response.ok) { - throw new Error(`Failed to load ${path}: ${response.statusText}`); - } - return response.json(); + const network = import.meta.env.VITE_NETWORK_CONFIG; + if (!network) { + throw new Error( + 'Network not configured. Please set VITE_NETWORK_CONFIG in .env file. Currently supported networks: ' + + configuredNetworks.join(', ') + ); + } + const path = `/config/${network}/guardians.json`; + const response = await fetch(path); + if (!response.ok) { + throw new Error(`Failed to load ${path}: ${response.statusText}`); + } + return response.json(); } - diff --git a/packages/guardian-prover-health-check-ui/src/lib/types.ts b/packages/guardian-prover-health-check-ui/src/lib/types.ts index cfc507752d3..ed4038ef9a5 100644 --- a/packages/guardian-prover-health-check-ui/src/lib/types.ts +++ b/packages/guardian-prover-health-check-ui/src/lib/types.ts @@ -1,4 +1,4 @@ -import type { Address } from "viem"; +import type { Address } from 'viem'; export type SignedBlock = { blockHash: string;