Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GO support #1938

Merged
merged 2 commits into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion common/config/dpaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export const ETH_SINGULAR: DPath = {
value: "m/0'/0'/0'"
};

export const GO_DEFAULT: DPath = {
label: 'Default (GO)',
value: "m/44'/6060'/0'/0"
};

export const DPaths: DPath[] = [
ETH_DEFAULT,
ETH_TREZOR,
Expand All @@ -93,7 +98,8 @@ export const DPaths: DPath[] = [
MUSIC_DEFAULT,
ETSC_DEFAULT,
EGEM_DEFAULT,
CLO_DEFAULT
CLO_DEFAULT,
GO_DEFAULT
];

// PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT
Expand Down
9 changes: 9 additions & 0 deletions common/libs/nodes/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
service: '0xinfra.com',
url: 'https://clo-geth.0xinfra.com/'
}
],

GO: [
{
name: makeNodeName('GO', 'go'),
type: 'rpc',
service: 'gochain.io',
url: 'https://rpc.gochain.io/'
}
]
};

Expand Down
27 changes: 26 additions & 1 deletion common/reducers/config/networks/staticNetworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
MUSIC_DEFAULT,
ETSC_DEFAULT,
EGEM_DEFAULT,
CLO_DEFAULT
CLO_DEFAULT,
GO_DEFAULT
} from 'config/dpaths';
import { ConfigAction } from 'actions/config';
import { makeExplorer } from 'utils/helpers';
Expand Down Expand Up @@ -364,6 +365,30 @@ export const INITIAL_STATE: State = {
max: 60,
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
}
}
};

Expand Down
3 changes: 2 additions & 1 deletion shared/types/network.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ type StaticNetworkIds =
| 'MUSIC'
| 'ETSC'
| 'EGEM'
| 'CLO';
| 'CLO'
| 'GO';

export interface BlockExplorerConfig {
name: string;
Expand Down