moar selectors

This commit is contained in:
HenryNguyen5 2018-02-02 17:21:41 -05:00
parent 1c7e2ab193
commit 35646af573
2 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,8 @@ export const getStaticNetworkConfig = (state: AppState): StaticNetworkConfig | u
return defaultNetwork;
};
export const getSelectedNetwork = (state: AppState) => getNetworks(state).selectedNetwork;
export const getCustomNetworkConfig = (state: AppState): CustomNetworkConfig | undefined => {
const { customNetworks, selectedNetwork } = getNetworks(state);
const customNetwork = customNetworks[selectedNetwork];

View File

@ -82,12 +82,16 @@ export function getStaticNodes(state: AppState) {
return getNodes(state).staticNodes;
}
export function getSelectedNode(state: AppState) {
return getNodes(state).selectedNode;
}
export function isNodeChanging(state): boolean {
return getNodes(state).selectedNode.pending;
return getSelectedNode(state).pending;
}
export function getNodeId(state: AppState): string {
return getNodes(state).selectedNode.nodeId;
return getSelectedNode(state).nodeId;
}
export function getIsWeb3Node(state: AppState): boolean {