Skip to content

Commit

Permalink
fix: expose find payloadscontroller
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Jan 29, 2024
1 parent 52f7d55 commit b3b855c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/govv3/utils/checkAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function isKnownAddress(value: Address, chainId: number): string[] | void

export function findPayloadsController(chainId: number): Address | void {
const key = Object.keys(addresses).find(
(key) => addresses[key].CHAIN_ID === chainId && addresses[key].PAYLOADS_CONTROLLER
(key) =>
(addresses[key as keyof typeof addresses] as any).CHAIN_ID === chainId &&
(addresses[key as keyof typeof addresses] as any).PAYLOADS_CONTROLLER
);
if (key) return addresses[key].PAYLOADS_CONTROLLER;
if (key) return (addresses[key as keyof typeof addresses] as any).PAYLOADS_CONTROLLER;
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * from './govv3/generateProposalReport';
export * from './utils/tenderlyClient';
export * from './utils/logger';
export * from './govv3/cache/updateCache';
export * from './govv3/utils/checkAddress';

0 comments on commit b3b855c

Please sign in to comment.