Commit 4b60be60 authored by Thibaut Sardan's avatar Thibaut Sardan Committed by YJ
Browse files

Add genesis hash from polkadot --dev v0.5.1 (#331)

* fix: add polkadot 0.5.1 dev genesis hash

* fix: typo
parent 5e2074f8
Pipeline #50238 failed with stage
in 48 seconds
......@@ -19,7 +19,7 @@ export const EthereumNetworkKeys = Object.freeze({
export const SubstrateNetworkKeys = Object.freeze({
KUSAMA: '0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf', // https://polkascan.io/pre/kusama/block/0
// POLKADOT: '123',
// POLKADOT_TEST: 's42', // needs a dummy genesis different than any other id (Eth chain id included)
POLKADOT_TEST: '0xe4e7807c233645b910c8db58e99ed53dc71fbfff5bbe8a5534fb7e83db449210', // genesis hash from v0.5.1 polkadot --dev commit e086465916c2778a7dede7dc62e551d801dc12ca
});
const substrateNetworkBase = {
......@@ -29,12 +29,12 @@ const substrateNetworkBase = {
prefix: 2,
title: 'Kusama'
},
// [SubstrateNetworkKeys.POLKADOT_TEST]: {
// color: '#ff8c00',
// genesisHash: SubstrateNetworkKeys.POLKADOT_TEST,
// prefix: 42,
// title: 'Polkadot Testnet'
// },
[SubstrateNetworkKeys.POLKADOT_TEST]: {
color: '#ff8c00',
genesisHash: SubstrateNetworkKeys.POLKADOT_TEST,
prefix: 42,
title: 'Polkadot Dev'
},
// [SubstrateNetworkKeys.POLKADOT]: {
// color: '#e6007a',
// genesisHash: SubstrateNetworkKeys.POLKADOT,
......
......@@ -22,7 +22,7 @@ export function parseSURI (suri) {
const matches = suri.match(RE_CAPTURE);
let phrase, derivationPath = '';
const ERROR = 'Invalid SURI input.';
if (matches) {
[_, phrase, derivationPath = ''] = matches;
try {
......@@ -76,7 +76,7 @@ export function parseDerivationPath (input) {
export function constructSURI ({ derivePath = '', password = '', phrase }) {
if(!phrase) {
if (!phrase) {
throw new Error('Cannot construct an SURI from emtpy phrase.');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment