Use @polkadot/networks (#382)

* adapt ss58

* fix yarn.lock ?

* cater for kusama hashes

* yarn update-interactive

* much nicer chains
This commit is contained in:
Thibaut Sardan
2020-10-17 10:56:12 +02:00
committed by GitHub
parent 72127121ca
commit a1808f590e
3 changed files with 884 additions and 947 deletions
+5 -10
View File
@@ -1,17 +1,12 @@
// Copyright 2017-2020 @polkadot/ui-settings authors & contributors
// SPDX-License-Identifier: Apache-2.0
import known from '@polkadot/networks';
type ChainDef = string[];
const chains: Record<string, ChainDef> = {
kusama: [
'0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf', // Kusama CC1
'0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636', // Kusama CC2
'0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe' // Kusama CC3
],
polkadot: [
'0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' // Polkadot CC1
]
};
const chains: Record <string, ChainDef> = known
.filter(({ genesisHash }) => genesisHash.length > 1)
.reduce((chains, { genesisHash, network }) => ({ ...chains, [network]: genesisHash }), {});
export default chains;