Skip to content

Commit

Permalink
Merge pull request #182 from ethpandaops/fix/electra-epoch
Browse files Browse the repository at this point in the history
fix(web): handle epoch as string
  • Loading branch information
Savid authored Nov 6, 2024
2 parents 28892a3 + fd7c7ef commit 395c64f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/parts/checkpoints/Checkpoints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Checkpoints() {
const latestEpoch = useMemo(() => {
const finalizedEpoch = statusData?.data?.finality?.finalized?.epoch;
if (!finalizedEpoch) return;
return parseInt(finalizedEpoch);
return finalizedEpoch;
}, [statusData]);

if (isLoading)
Expand Down
2 changes: 1 addition & 1 deletion web/src/parts/checkpoints/CheckpointsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { APIBeaconSlot } from '@types';
import { truncateHash } from '@utils';

export default function CheckpointsTable(props: {
latestEpoch?: number;
latestEpoch?: string;
slots: APIBeaconSlot[];
onSlotClick?: (slot: APIBeaconSlot) => void;
showCheckpoint?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion web/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface APIBeaconSlot {
slot: number;
block_root?: string;
state_root?: string;
epoch?: number;
epoch?: string;
time?: APISlotTime;
}

Expand Down

0 comments on commit 395c64f

Please sign in to comment.