From 2a1fce3f3e32bfcae46b0b7b66ecf41b62da209a Mon Sep 17 00:00:00 2001 From: Deams51 Date: Sun, 5 Aug 2018 20:01:43 +0200 Subject: [PATCH] Added GoChain testnet support --- .../config/networks/static/reducer.ts | 27 +++++++++++++++++++ common/libs/nodes/configs.ts | 9 +++++++ shared/types/network.d.ts | 1 + 3 files changed, 37 insertions(+) diff --git a/common/features/config/networks/static/reducer.ts b/common/features/config/networks/static/reducer.ts index b68a3b24..b66f9397 100644 --- a/common/features/config/networks/static/reducer.ts +++ b/common/features/config/networks/static/reducer.ts @@ -467,6 +467,32 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = { } }, + GO_TESTNET: { + id: 'GO_TESTNET', + name: 'GO', + unit: 'GO', + chainId: 31337, + isCustom: false, + color: '#00b04a', + blockExplorer: makeExplorer({ + name: 'GoChain Testnet Explorer', + origin: 'https://testnet-explorer.gochain.io' + }), + tokens: [], + contracts: [], + isTestnet: true, + dPathFormats: { + [SecureWalletName.TREZOR]: GO_DEFAULT, + [SecureWalletName.SAFE_T]: GO_DEFAULT, + [InsecureWalletName.MNEMONIC_PHRASE]: GO_DEFAULT + }, + gasPriceSettings: { + min: 2, + max: 60, + initial: 2 + } + }, + EOSC: { id: 'EOSC', name: 'EOS Classic', @@ -491,6 +517,7 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = { initial: 20 } }, + ESN: { id: 'ESN', name: 'EthersocialNetwork', diff --git a/common/libs/nodes/configs.ts b/common/libs/nodes/configs.ts index 18505415..4ce5ad6a 100644 --- a/common/libs/nodes/configs.ts +++ b/common/libs/nodes/configs.ts @@ -195,6 +195,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { } ], + GO_TESTNET: [ + { + name: makeNodeName('GO_TESTNET', 'go_testnet'), + type: 'rpc', + service: 'testnet-rpc.gochain.io', + url: 'https://testnet-rpc.gochain.io/' + } + ], + EOSC: [ { name: makeNodeName('EOSC', 'eosc'), diff --git a/shared/types/network.d.ts b/shared/types/network.d.ts index 12a55871..5102cc54 100644 --- a/shared/types/network.d.ts +++ b/shared/types/network.d.ts @@ -18,6 +18,7 @@ type StaticNetworkIds = | 'RSK' | 'RSK_TESTNET' | 'GO' + | 'GO_TESTNET' | 'EOSC' | 'ESN';