mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 03:54:13 +00:00
moar selectors
This commit is contained in:
parent
1c7e2ab193
commit
35646af573
@ -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];
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user