From b6b5c2ed1fc4e6bf471762d4e8eaa2eb3c22058e Mon Sep 17 00:00:00 2001 From: nedsalk Date: Tue, 17 Dec 2024 14:58:51 +0100 Subject: [PATCH] refactor out function --- .../abi/src/parser/specifications/v1/abi-type-mappers.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts b/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts index 4be87328a5..5dad5545b1 100644 --- a/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts +++ b/packages/abi/src/parser/specifications/v1/abi-type-mappers.ts @@ -21,14 +21,12 @@ function mapMetadata(type: ResolvableType | ResolvedType) { return result; } -function isResolvedType(type: ResolvableType | ResolvedType): type is ResolvedType { - return 'typeId' in type; -} - function isResolvedConcreteType( type: ResolvableType | ResolvedType ): type is ResolvedType & { typeId: string } { - return isResolvedType(type) && typeof type.typeId === 'string'; + const isResolvedType = 'typeId' in type; + + return isResolvedType && typeof type.typeId === 'string'; } function mapComponentType(component: ResolvableComponent): AbiTypeComponent {