Files
ui/packages/ui-settings/src/defaults/chains.ts
T
2021-02-08 17:50:38 +01:00

13 lines
377 B
TypeScript

// Copyright 2017-2021 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import known from '@polkadot/networks';
type ChainDef = string[];
const chains: Record <string, ChainDef> = known
.filter((n) => n.genesisHash.length)
.reduce((chains, { genesisHash, network }) => ({ ...chains, [network]: genesisHash }), {});
export { chains };