diff --git a/packages/status-page/src/components/StatusIndicator.svelte b/packages/status-page/src/components/StatusIndicator.svelte index a44c7e869bd..f6c2393d44a 100644 --- a/packages/status-page/src/components/StatusIndicator.svelte +++ b/packages/status-page/src/components/StatusIndicator.svelte @@ -26,7 +26,7 @@ export let colorFunc: (value: Status) => string; - export let onClick: (value: Status) => void = null; + export let onClick: (value: Status) => void; export let header: string; @@ -89,7 +89,7 @@ onClick(statusValue)} + on:click={() => (onClick ? onClick(statusValue) : "")} > {displayStatusValue(statusValue)} diff --git a/packages/status-page/src/pages/home/Home.svelte b/packages/status-page/src/pages/home/Home.svelte index 1e2f8a5f4d3..790b811dfb2 100644 --- a/packages/status-page/src/pages/home/Home.svelte +++ b/packages/status-page/src/pages/home/Home.svelte @@ -242,8 +242,7 @@ ) => { const contract = new Contract(address, TaikoL1, provider); contract.on("BlockProven", (id, parentHash, blockHash, timestamp) => { - console.log("block proven", timestamp); - onEvent(new Date(timestamp).toString()); + onEvent(new Date(timestamp.toNumber() * 1000).toString()); }); }, colorFunc: function (status: Status) { @@ -284,7 +283,7 @@ address: string ) => { const stateVars = await getStateVariables(provider, address); - return stateVars.avgBlockTime.toNumber(); + return `${stateVars.avgBlockTime.toNumber()} seconds`; }, tooltip: "The current average block time, updated when a block is successfully proposed.",