From e2365f5efff958d7f9b6f9d6673f5da8cc819fd5 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Thu, 25 Jan 2024 16:41:47 +0100 Subject: [PATCH] fix: cleanup --- packages/api/test/utils/checkAgainstSpec.ts | 5 +---- packages/beacon-node/src/api/impl/beacon/blocks/index.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/api/test/utils/checkAgainstSpec.ts b/packages/api/test/utils/checkAgainstSpec.ts index fd93bd611b36..db167d852480 100644 --- a/packages/api/test/utils/checkAgainstSpec.ts +++ b/packages/api/test/utils/checkAgainstSpec.ts @@ -202,10 +202,7 @@ function prettyAjvErrors(errors: ErrorObject[] | null | undefined): string { type StringifiedProperty = string | StringifiedProperty[] | null | undefined; function stringifyProperty(value: unknown): StringifiedProperty { - if (value === undefined || value === null || typeof value === "string") { - // Handle specifically null as `typeof null === "object"` - return value; - } else if (typeof value === "number") { + if (typeof value === "number") { return value.toString(10); } else if (Array.isArray(value)) { return value.map(stringifyProperty); diff --git a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts index 2a911b4e6cfe..6fde04bc737c 100644 --- a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts @@ -406,7 +406,7 @@ export function getBeaconBlockApi({ await publishBlock(signedBlockOrContents, opts); }, - async getBlobSidecars(blockId, indices = []) { + async getBlobSidecars(blockId, indices) { const {block, executionOptimistic} = await resolveBlockId(chain, blockId); const blockRoot = config.getForkTypes(block.message.slot).BeaconBlock.hashTreeRoot(block.message);