diff --git a/typescript/cli/src/check/warp.ts b/typescript/cli/src/check/warp.ts index a31fac62e..d92a67e14 100644 --- a/typescript/cli/src/check/warp.ts +++ b/typescript/cli/src/check/warp.ts @@ -15,9 +15,10 @@ export async function runWarpRouteCheck({ onChainWarpConfig: WarpRouteDeployConfig; }): Promise { // Go through each chain and only add to the output the chains that have mismatches - const [violations, isInvalid] = Object.keys(warpRouteConfig).reduce( - (acc, chain) => { - const { mergedObject, isInvalid } = diffObjMerge( + const violations: { [key: string]: ObjectDiff } = {}; // Improved: Declared a specific type for violations + let isInvalid = false; // Improved: Initialized isInvalid separately + for (const chain of Object.keys(warpRouteConfig)) { + const { mergedObject, isInvalid: currentIsInvalid } = diffObjMerge( normalizeConfig(onChainWarpConfig[chain]), normalizeConfig(warpRouteConfig[chain]), );