mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 06:32:37 +03:00
10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
import { z } from 'zod';
|
|
import { SupportedChainId } from '../types';
|
|
|
|
const isValidChainId = (chainId: string): chainId is SupportedChainId => {
|
|
const { success } = z.nativeEnum(SupportedChainId).safeParse(chainId);
|
|
return success;
|
|
};
|
|
|
|
export default isValidChainId;
|