Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(status-page): Status decimals fix + L2 EIP1559 stats added #13832

Merged
merged 8 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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