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;
}): Promise<void> {
// 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]),
);

Loading…
Cancel
Save