MyCrypto/common/actions/rates/actionCreators.ts
Daniel Ternyak e7f88a6a0a
Remove redux-promise-middleware (#1022)
* Use shapeshift for all swaps.

* Replace existing redux-promise-middleware based CCRequest action with saga based action.

* Remove module from package.json, store middleware, webpack_config.

* fix snapshot

* Add return typing

* Add test for saga
2018-02-07 17:59:55 -06:00

27 lines
804 B
TypeScript

import * as interfaces from './actionTypes';
import { TypeKeys } from './constants';
import { CCResponse } from 'api/rates';
export type TFetchCCRatesRequested = typeof fetchCCRatesRequested;
export function fetchCCRatesRequested(symbols: string[] = []): interfaces.FetchCCRatesRequested {
return {
type: TypeKeys.RATES_FETCH_CC_REQUESTED,
payload: symbols
};
}
export type TFetchCCRatesSucceeded = typeof fetchCCRatesSucceeded;
export function fetchCCRatesSucceeded(payload: CCResponse): interfaces.FetchCCRatesSucceeded {
return {
type: TypeKeys.RATES_FETCH_CC_SUCCEEDED,
payload
};
}
export type TFetchCCRatesFailed = typeof fetchCCRatesFailed;
export function fetchCCRatesFailed(): interfaces.FetchCCRatesFailed {
return {
type: TypeKeys.RATES_FETCH_CC_FAILED
};
}