Skip to content

Commit

Permalink
revert: address filtering in contracts utility function to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ljankovic-txfusion committed Feb 3, 2025
1 parent 9760421 commit 2bbf8b8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions typescript/sdk/src/contracts/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ export function filterAddressesMap<F extends HyperlaneFactories>(
factories: F,
): HyperlaneAddressesMap<F> {
const factoryKeys = Object.keys(factories);
// Filter out addresses that we do not have factories for and remove undefined values
// Filter out addresses that we do not have factories for
const pickedAddressesMap = objMap(addressesMap, (_, addresses) =>
objFilter(
pick(addresses, factoryKeys),
(_, value): value is Address => value !== undefined,
),
pick(addresses, factoryKeys),
);

const chainsWithMissingAddresses = new Set<string>();
Expand Down

0 comments on commit 2bbf8b8

Please sign in to comment.