Skip to content

Commit

Permalink
feat(status-page): Status decimals fix + L2 EIP1559 stats added (#13832)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed May 29, 2023
1 parent d72b97f commit 3871641
Show file tree
Hide file tree
Showing 6 changed files with 766 additions and 56 deletions.
16 changes: 11 additions & 5 deletions packages/status-page/src/components/StatusIndicator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { fade } from "svelte/transition";
import Tooltip from "./Tooltip.svelte";
import TooltipModal from "./TooltipModal.svelte";
import DetailsModal from "./DetailsModal.svelte";
export let provider: ethers.providers.JsonRpcProvider;
export let contractAddress: string;
Expand All @@ -23,7 +22,7 @@
provider: ethers.providers.JsonRpcProvider,
contractAddress: string,
onEvent: (value: Status) => void
) => void;
) => () => void;
export let colorFunc: (value: Status) => string;
Expand All @@ -43,6 +42,8 @@
let detailsOpen: boolean = false;
let cancelFunc: () => void = () => {};
onMount(async () => {
try {
if (status) {
Expand All @@ -57,9 +58,13 @@
}
if (watchStatusFunc) {
watchStatusFunc(provider, contractAddress, (value: Status) => {
statusValue = value;
});
cancelFunc = watchStatusFunc(
provider,
contractAddress,
(value: Status) => {
statusValue = value;
}
);
}
if (intervalInMs !== 0) {
Expand All @@ -75,6 +80,7 @@
onDestroy(() => {
if (interval) clearInterval(interval);
if (cancelFunc) cancelFunc();
});
</script>

Expand Down
Loading

0 comments on commit 3871641

Please sign in to comment.