Add GO support (#1938)

This commit is contained in:
r-kononov 2018-06-14 02:39:50 +06:00 committed by Daniel Ternyak
parent 74cb8de16e
commit 14e361b843
4 changed files with 44 additions and 3 deletions

View File

@ -78,6 +78,11 @@ export const ETH_SINGULAR: DPath = {
value: "m/0'/0'/0'" value: "m/0'/0'/0'"
}; };
export const GO_DEFAULT: DPath = {
label: 'Default (GO)',
value: "m/44'/6060'/0'/0"
};
export const DPaths: DPath[] = [ export const DPaths: DPath[] = [
ETH_DEFAULT, ETH_DEFAULT,
ETH_TREZOR, ETH_TREZOR,
@ -93,7 +98,8 @@ export const DPaths: DPath[] = [
MUSIC_DEFAULT, MUSIC_DEFAULT,
ETSC_DEFAULT, ETSC_DEFAULT,
EGEM_DEFAULT, EGEM_DEFAULT,
CLO_DEFAULT CLO_DEFAULT,
GO_DEFAULT
]; ];
// PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT // PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT

View File

@ -165,6 +165,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
service: '0xinfra.com', service: '0xinfra.com',
url: 'https://clo-geth.0xinfra.com/' url: 'https://clo-geth.0xinfra.com/'
} }
],
GO: [
{
name: makeNodeName('GO', 'go'),
type: 'rpc',
service: 'gochain.io',
url: 'https://rpc.gochain.io/'
}
] ]
}; };

View File

@ -20,7 +20,8 @@ import {
MUSIC_DEFAULT, MUSIC_DEFAULT,
ETSC_DEFAULT, ETSC_DEFAULT,
EGEM_DEFAULT, EGEM_DEFAULT,
CLO_DEFAULT CLO_DEFAULT,
GO_DEFAULT
} from 'config/dpaths'; } from 'config/dpaths';
import { ConfigAction } from 'actions/config'; import { ConfigAction } from 'actions/config';
import { makeExplorer } from 'utils/helpers'; import { makeExplorer } from 'utils/helpers';
@ -364,6 +365,30 @@ export const INITIAL_STATE: State = {
max: 60, max: 60,
initial: 20 initial: 20
} }
},
GO: {
id: 'GO',
name: 'GO',
unit: 'GO',
chainId: 60,
isCustom: false,
color: '#00b04a',
blockExplorer: makeExplorer({
name: 'GoChain Explorer',
origin: 'https://explorer.gochain.io'
}),
tokens: [],
contracts: [],
dPathFormats: {
[SecureWalletName.TREZOR]: GO_DEFAULT,
[InsecureWalletName.MNEMONIC_PHRASE]: GO_DEFAULT
},
gasPriceSettings: {
min: 2,
max: 60,
initial: 2
}
} }
}; };

View File

@ -14,7 +14,8 @@ type StaticNetworkIds =
| 'MUSIC' | 'MUSIC'
| 'ETSC' | 'ETSC'
| 'EGEM' | 'EGEM'
| 'CLO'; | 'CLO'
| 'GO';
export interface BlockExplorerConfig { export interface BlockExplorerConfig {
name: string; name: string;