From 645889de9a918f5ed1d61d379c3b422ae64b77e1 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 9 Oct 2024 17:24:25 +0200 Subject: [PATCH] fix --- src/types/ParentChain.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/types/ParentChain.ts b/src/types/ParentChain.ts index 8bcbdf05..2fda9882 100644 --- a/src/types/ParentChain.ts +++ b/src/types/ParentChain.ts @@ -28,7 +28,9 @@ export function validateParentChain( throw new Error(`Parent chain not supported: ${chainId}`); } - return { chainId, isCustom: isCustom(chainId) } as - | { chainId: number; isCustom: true } - | { chainId: ParentChainId; isCustom: false }; + if (isCustom(chainId)) { + return { chainId, isCustom: true }; + } + + return { chainId: chainId as ParentChainId, isCustom: false }; }