William O'Beirne 31912c0f83 Gas Price Estimates API (#1050)
* Setup api / reducers / actions for gas.

* Implement gas price saga, fetch from component, and loading states. Blocked on CORS.

* Implement caching mechanism.

* Add tests for gas saga and reducer.

* More testing.

* Indicate that gas price is recommended when fetched from API.

* Hide track while loading.

* Fix tscheck.

* Check gas estimate before assuming its ok.

* Check for correct logical order of gas prices.

* Tscheck fixes.
2018-02-16 13:01:39 -06:00

6 lines
239 B
TypeScript

import { AppState } from 'reducers';
const getGas = (state: AppState) => state.gas;
export const getEstimates = (state: AppState) => getGas(state).estimates;
export const getIsEstimating = (state: AppState) => getGas(state).isEstimating;