Skip to content

Commit

Permalink
fix(tangle-dapp): Fix bridge disabled button (#2592)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavan Soratur <[email protected]>
  • Loading branch information
devpavan04 and Pavan Soratur authored Oct 19, 2024
1 parent 887a693 commit 34ae4ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/tangle-dapp/lib/hyperlane/assembleChainMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ChainMap,
ChainMetadata,
ChainMetadataSchema,
ChainTechnicalStack,
} from '@hyperlane-xyz/sdk';
import { ProtocolType } from '@hyperlane-xyz/utils';
import { z } from 'zod';
Expand Down Expand Up @@ -34,6 +35,17 @@ export default async function assembleChainMetadata() {
}

const chains = { ...defaultChainMetadata, ...customChainMetadata };

// Handle invalid ChainTechnicalStack values - ex: opstack
Object.entries(chains).forEach(([_chainName, chain]) => {
if (
typeof chain.technicalStack === 'string' &&
!Object.values(ChainTechnicalStack).includes(chain.technicalStack)
) {
chain.technicalStack = ChainTechnicalStack.Other;
}
});

return { chains, registry };
}

Expand Down

0 comments on commit 34ae4ab

Please sign in to comment.