ghost-portal/packages/apps-config/src/api/constants.ts
Jaco Greeff 41df626547
Bump networks (w/ hasLedgerSupport flag) (#4415)
* Bump networks (w/ hasLedgersupport flag)

* genesisHex
2021-01-14 16:38:26 +01:00

23 lines
672 B
TypeScript

// Copyright 2017-2021 @polkadot/app-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import BN from 'bn.js';
import networks from '@polkadot/networks';
import { assert } from '@polkadot/util';
function getGenesis (name: string): string {
const network = networks.find(({ network }) => network === name);
assert(network && network.genesisHash[0], `Unable to find genesisHash for ${name}`);
return network.genesisHash[0];
}
export const KULUPU_GENESIS = getGenesis('kulupu');
export const KUSAMA_GENESIS = getGenesis('kusama');
export const POLKADOT_GENESIS = getGenesis('polkadot');
export const POLKADOT_DENOM_BLOCK = new BN(1248328);