mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-17 13:37:01 +00:00
* Updated all translations, moved into their own folders. * Switch translations to use Markdown component. * Remove markup tests, since were using a module now. * Fix flow errors, render react elements instead of dangerouslysetinnerhtml. * Make translate a connected component, so it updates with Redux. * Fix flow errors * First pass at returning raw when needed for placeholder. * Added aria test. * Fixed flow errors and linter warnings. * Move settimeout to saga. * Change reload to 250 ms from 1500 ms
34 lines
963 B
JavaScript
34 lines
963 B
JavaScript
// @flow
|
|
import type { State } from 'reducers';
|
|
import { BaseNode } from 'libs/nodes';
|
|
import { NODES, NETWORKS } from 'config/data';
|
|
import type { NodeConfig, NetworkConfig, NetworkContract } from 'config/data';
|
|
|
|
export function getNode(state: State): string {
|
|
return state.config.nodeSelection;
|
|
}
|
|
|
|
export function getNodeConfig(state: State): NodeConfig {
|
|
return NODES[state.config.nodeSelection];
|
|
}
|
|
|
|
export function getNodeLib(state: State): BaseNode {
|
|
return NODES[state.config.nodeSelection].lib;
|
|
}
|
|
|
|
export function getNetworkConfig(state: State): NetworkConfig {
|
|
return NETWORKS[NODES[state.config.nodeSelection].network];
|
|
}
|
|
|
|
export function getNetworkContracts(state: State): ?Array<NetworkContract> {
|
|
return getNetworkConfig(state).contracts;
|
|
}
|
|
|
|
export function getGasPriceGwei(state: State): number {
|
|
return state.config.gasPriceGwei;
|
|
}
|
|
|
|
export function getLanguageSelection(state: State): string {
|
|
return state.config.languageSelection;
|
|
}
|