Skip to content

Commit

Permalink
[EOSC] Add EOS Classic node support (#1962)
Browse files Browse the repository at this point in the history
  • Loading branch information
EOS Classic authored and dternyak committed Jun 20, 2018
1 parent 9f4f501 commit cb5530c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 5 deletions.
8 changes: 7 additions & 1 deletion common/config/dpaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ export const GO_DEFAULT: DPath = {
value: "m/44'/6060'/0'/0"
};

export const EOSC_DEFAULT: DPath = {
label: 'Default (EOSC)',
value: "m/44'/2018'/0'/0"
};

export const DPaths: DPath[] = [
ETH_DEFAULT,
ETH_TREZOR,
Expand All @@ -105,7 +110,8 @@ export const DPaths: DPath[] = [
EGEM_DEFAULT,
CLO_DEFAULT,
RSK_TESTNET,
GO_DEFAULT
GO_DEFAULT,
EOSC_DEFAULT
];

// PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT
Expand Down
4 changes: 2 additions & 2 deletions common/features/config/__snapshots__/sagas.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object {
"@@redux-saga/IO": true,
"SELECT": Object {
"args": Array [
"GO",
"EOSC",
],
"selector": [Function],
},
Expand All @@ -22,4 +22,4 @@ Object {
"selector": [Function],
},
}
`;
`;
27 changes: 26 additions & 1 deletion common/features/config/networks/static/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
EGEM_DEFAULT,
CLO_DEFAULT,
RSK_TESTNET,
GO_DEFAULT
GO_DEFAULT,
EOSC_DEFAULT
} from 'config/dpaths';
import { makeExplorer } from 'utils/helpers';
import { StaticNetworksState } from './types';
Expand Down Expand Up @@ -415,6 +416,30 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = {
max: 60,
initial: 2
}
},

EOSC: {
id: 'EOSC',
name: 'EOS Classic',
unit: 'EOSC',
chainId: 20,
isCustom: false,
color: '#926565',
blockExplorer: makeExplorer({
name: 'EOSC Explorer',
origin: 'https://explorer.eos-classic.io'
}),
tokens: [],
contracts: [],
dPathFormats: {
[SecureWalletName.TREZOR]: EOSC_DEFAULT,
[InsecureWalletName.MNEMONIC_PHRASE]: EOSC_DEFAULT
},
gasPriceSettings: {
min: 1,
max: 60,
initial: 20
}
}
};

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 @@ -184,6 +184,15 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = {
service: 'gochain.io',
url: 'https://rpc.gochain.io/'
}
],

EOSC: [
{
name: makeNodeName('EOSC', 'eosc'),
type: 'rpc',
service: 'eos-classic.io',
url: 'https://node.eos-classic.io/'
}
]
};

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 =
| 'EGEM'
| 'CLO'
| 'RSK_TESTNET'
| 'GO';
| 'GO'
| 'EOSC';

export interface BlockExplorerConfig {
name: string;
Expand Down

0 comments on commit cb5530c

Please sign in to comment.