Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Aug 31, 2023
1 parent 4f58fc5 commit 381c6dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/light-client/src/transport/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class LightClientRestTransport extends (EventEmitter as {new (): RestEven
async fetchBlock(blockRootAsString: string): Promise<{version: ForkName; data: allForks.SignedBeaconBlock}> {
const res = await this.api.beacon.getBlockV2(blockRootAsString);
ApiError.assert(res);
return res.response;
return res.response as {version: ForkName; data: allForks.SignedBeaconBlock};
}

onOptimisticUpdate(handler: (optimisticUpdate: allForks.LightClientOptimisticUpdate) => void): void {
Expand Down
2 changes: 1 addition & 1 deletion packages/prover/src/utils/consensus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function fetchNearestBlock(
): Promise<capella.SignedBeaconBlock> {
const res = await api.beacon.getBlockV2(slot);

if (res.ok) return res.response.data;
if (res.ok) return (res.response as {data: allForks.SignedBeaconBlock}).data;

if (!res.ok && res.error.code === 404) {
return fetchNearestBlock(api, direction === "down" ? slot - 1 : slot + 1);
Expand Down

0 comments on commit 381c6dc

Please sign in to comment.