Skip to content

Commit

Permalink
fix(web): handle epoch as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Savid committed Nov 6, 2024
1 parent 28892a3 commit fd7c7ef
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 fd7c7ef

Please sign in to comment.