Update warp.ts

pull/4723/head
Fazleiw 1 month ago committed by GitHub
parent 32d0a67c21
commit 6260fa2bc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      typescript/cli/src/check/warp.ts

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

Loading…
Cancel
Save