From 81f0faa75938cc149d041179b619075933eb9459 Mon Sep 17 00:00:00 2001 From: Ameesha Agrawal Date: Thu, 13 Jun 2024 16:48:21 +0530 Subject: [PATCH] fix: chainType sdk cli --- scripts/deploy/single-click-deploy/integrators/utils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/deploy/single-click-deploy/integrators/utils.ts b/scripts/deploy/single-click-deploy/integrators/utils.ts index cb0455b0..bf20c783 100644 --- a/scripts/deploy/single-click-deploy/integrators/utils.ts +++ b/scripts/deploy/single-click-deploy/integrators/utils.ts @@ -127,25 +127,26 @@ export const updateSDK = async ( ); } - if (chainType === 0) { + const chainTypeInString = Object.keys(ChainType)[chainType]; + if (chainTypeInString === ChainType.arbChain) { await updateFile( "arbChains.ts", `,\n ChainSlug.${chainName.toUpperCase()},\n];`, ",\n];" ); - } else if (chainType === 1) { + } else if (chainTypeInString === ChainType.arbL3Chain) { await updateFile( "arbL3Chains.ts", `,\n ChainSlug.${chainName.toUpperCase()},\n];`, ",\n];" ); - } else if (chainType === 2) { + } else if (chainTypeInString === ChainType.opStackL2Chain) { await updateFile( "opStackChains.ts", `,\n ChainSlug.${chainName.toUpperCase()},\n];`, ",\n];" ); - } else if (chainType === 3) { + } else if (chainTypeInString === ChainType.polygonCDKChain) { await updateFile( "polygonCDKChains.ts", `,\n ChainSlug.${chainName.toUpperCase()},\n];`,