2017-07-04 01:25:01 +00:00
|
|
|
// @flow
|
|
|
|
import type { State } from 'reducers';
|
|
|
|
import { BaseNode } from 'libs/nodes';
|
2017-07-13 21:02:39 +00:00
|
|
|
import { NODES, NETWORKS } from 'config/data';
|
|
|
|
import type { NetworkConfig } from 'config/data';
|
2017-07-04 01:25:01 +00:00
|
|
|
|
|
|
|
export function getNodeLib(state: State): BaseNode {
|
2017-07-04 03:21:19 +00:00
|
|
|
return NODES[state.config.nodeSelection].lib;
|
2017-07-04 01:25:01 +00:00
|
|
|
}
|
2017-07-13 21:02:39 +00:00
|
|
|
|
|
|
|
export function getNetworkConfig(state: State): NetworkConfig {
|
|
|
|
return NETWORKS[NODES[state.config.nodeSelection].network];
|
|
|
|
}
|