mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 19:44:21 +00:00
e7f88a6a0a
* 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
27 lines
804 B
TypeScript
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
|
|
};
|
|
}
|