From ab3b890d3ba8c970c9f165ed89a959039f0ee759 Mon Sep 17 00:00:00 2001 From: plubber <51789398+ericHgorski@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:38:30 -0500 Subject: [PATCH] Revert "fix: codegen" --- chain-registry | 2 +- initia-registry | 2 +- src/ast/parse-chain-json.ts | 10 +++------- src/ast/parse-chain-paths.ts | 2 -- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/chain-registry b/chain-registry index 263421ec..54153b0b 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit 263421ec27704271c646ab4fe0037e158e2589e5 +Subproject commit 54153b0bd5af127b799ab552d4f1d59cee69b98c diff --git a/initia-registry b/initia-registry index 692fd520..57714e59 160000 --- a/initia-registry +++ b/initia-registry @@ -1 +1 @@ -Subproject commit 692fd520a3e450d033dbee07a8e062c82da9de0a +Subproject commit 57714e59d392a57a96322a044f2cce00bbf838fb diff --git a/src/ast/parse-chain-json.ts b/src/ast/parse-chain-json.ts index ddcf8f94..cea82272 100644 --- a/src/ast/parse-chain-json.ts +++ b/src/ast/parse-chain-json.ts @@ -12,11 +12,7 @@ export async function parseChainJson({ registryPath, chainPath }: Args) { const jsonPath = path.resolve(registryPath, chainPath, "chain.json"); const content = await fs.readFile(jsonPath, "utf-8"); - try { - const data: Chain = await chainSchema.parseAsync(JSON.parse(content)); - return data; - } catch (error) { - console.error("Error parsing chain.json", error); - return null; - } + const data: Chain = await chainSchema.parseAsync(JSON.parse(content)); + + return data; } diff --git a/src/ast/parse-chain-paths.ts b/src/ast/parse-chain-paths.ts index d083c6eb..dd19b8b2 100644 --- a/src/ast/parse-chain-paths.ts +++ b/src/ast/parse-chain-paths.ts @@ -39,8 +39,6 @@ export async function parseChainPaths({ parseAssetListJson({ registryPath: _registryPath, chainPath }), parseChainJson({ registryPath: _registryPath, chainPath }), ]); - if (!assetlist) return; - if (!chain) return; chains.push(chain); assetlists.push(assetlist);