mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-30 20:28:09 +00:00
eslint ./src/services
This commit is contained in:
parent
1ea6d0be4c
commit
de7e8914cb
@ -13,7 +13,6 @@ import type {
|
|||||||
AsyncAction,
|
AsyncAction,
|
||||||
GetState,
|
GetState,
|
||||||
} from 'flowtype';
|
} from 'flowtype';
|
||||||
import type { Config, FiatValueTicker } from 'reducers/LocalStorageReducer';
|
|
||||||
|
|
||||||
export const RATE_UPDATE: 'rate__update' = 'rate__update';
|
export const RATE_UPDATE: 'rate__update' = 'rate__update';
|
||||||
|
|
||||||
@ -24,11 +23,11 @@ export type FiatRateAction = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loadRateAction = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
const loadRateAction = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||||
const config: ?Config = getState().localStorage.config;
|
const { config } = getState().localStorage;
|
||||||
if (!config) return;
|
if (!config) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
config.fiatValueTickers.forEach(async (ticker: FiatValueTicker) => {
|
config.fiatValueTickers.forEach(async (ticker) => {
|
||||||
// const rate: ?Array<any> = await JSONRequest(`${ticker.url}?convert=USD`, 'json');
|
// const rate: ?Array<any> = await JSONRequest(`${ticker.url}?convert=USD`, 'json');
|
||||||
const rate: ?Array<any> = await httpRequest(`${ticker.url}?convert=USD`, 'json');
|
const rate: ?Array<any> = await httpRequest(`${ticker.url}?convert=USD`, 'json');
|
||||||
if (rate) {
|
if (rate) {
|
||||||
|
Loading…
Reference in New Issue
Block a user