diff --git a/src/services/CoinmarketcapService.js b/src/services/CoinmarketcapService.js index af6e914a..d6c0e9ea 100644 --- a/src/services/CoinmarketcapService.js +++ b/src/services/CoinmarketcapService.js @@ -13,7 +13,6 @@ import type { AsyncAction, GetState, } from 'flowtype'; -import type { Config, FiatValueTicker } from 'reducers/LocalStorageReducer'; export const RATE_UPDATE: 'rate__update' = 'rate__update'; @@ -24,11 +23,11 @@ export type FiatRateAction = { } const loadRateAction = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise => { - const config: ?Config = getState().localStorage.config; + const { config } = getState().localStorage; if (!config) return; try { - config.fiatValueTickers.forEach(async (ticker: FiatValueTicker) => { + config.fiatValueTickers.forEach(async (ticker) => { // const rate: ?Array = await JSONRequest(`${ticker.url}?convert=USD`, 'json'); const rate: ?Array = await httpRequest(`${ticker.url}?convert=USD`, 'json'); if (rate) {