ilink-world/redux/actions/WalletActions.js

213 lines
5.2 KiB
JavaScript
Raw Normal View History

2020-04-28 09:22:36 +00:00
import {
2020-11-18 11:22:53 +00:00
GET_OPERATOR_LIST_ERROR,
GET_OPERATOR_LIST_PENDING,
GET_OPERATOR_LIST_RESET,
GET_OPERATOR_LIST_SUCCESS,
LINK_CARD_ERROR,
LINK_CARD_PENDING,
LINK_CARD_RESET,
LINK_CARD_SUCCESS,
WALLET_GET_COMMISSION_ERROR,
WALLET_GET_COMMISSION_PENDING,
WALLET_GET_COMMISSION_RESET,
WALLET_GET_COMMISSION_SUCCESS,
WALLET_HISTORY_ERROR,
WALLET_HISTORY_HYPER_SUPER__ERROR,
WALLET_HISTORY_HYPER_SUPER__RESET,
WALLET_HISTORY_HYPER_SUPER__SUCCESS,
WALLET_HISTORY_HYPER_SUPER_PENDING,
WALLET_HISTORY_PENDING,
WALLET_HISTORY_RESET,
WALLET_HISTORY_SUCCESS,
WALLET_LIST_DETAIL_ERROR,
WALLET_LIST_DETAIL_PENDING,
WALLET_LIST_DETAIL_RESET,
WALLET_LIST_DETAIL_SUCCESS,
WALLET_LIST_ERROR,
WALLET_LIST_PENDING,
WALLET_LIST_SUCCESS,
WALLET_TRANSFER_COMMISSION_ERROR,
WALLET_TRANSFER_COMMISSION_PENDING,
WALLET_TRANSFER_COMMISSION_RESET,
WALLET_TRANSFER_COMMISSION_SUCCESS
2020-04-28 09:22:36 +00:00
} from "../types/WalletType";
2020-04-17 22:03:04 +00:00
export const fetchWalletListPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_PENDING
2020-04-17 22:03:04 +00:00
});
export const fetchWalletListSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_SUCCESS,
result: res,
2020-04-17 22:03:04 +00:00
});
export const fetchWalletListError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_ERROR,
result: error
2020-04-28 09:22:36 +00:00
});
2020-05-03 09:16:24 +00:00
export const fetchWalletListReset = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_RESET,
result: error
2020-05-03 09:16:24 +00:00
});
2020-07-02 14:35:00 +00:00
/**
* ---------------------------------------------------
*/
2020-05-03 09:16:24 +00:00
export const fetchWalletListDetailPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_DETAIL_PENDING
2020-05-03 09:16:24 +00:00
});
export const fetchWalletListDetailSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_DETAIL_SUCCESS,
result: res,
2020-05-03 09:16:24 +00:00
});
export const fetchWalletListDetailError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_DETAIL_ERROR,
result: error
2020-05-03 09:16:24 +00:00
});
export const fetchWalletListDetailReset = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_LIST_DETAIL_RESET,
result: error
2020-05-03 09:16:24 +00:00
});
2020-07-02 14:35:00 +00:00
/**
* ---------------------------------------------------
*/
2020-04-28 09:22:36 +00:00
export const fetchWalletHistoryPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_PENDING
2020-04-28 09:22:36 +00:00
});
2020-05-03 09:16:24 +00:00
export const fetchWalletHistoryReset = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_RESET
2020-05-03 09:16:24 +00:00
});
2020-04-28 09:22:36 +00:00
export const fetchWalletHistorySuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_SUCCESS,
result: res,
2020-04-28 09:22:36 +00:00
});
export const fetchWalletHistoryError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_ERROR,
result: error
2020-04-28 09:22:36 +00:00
});
2020-10-16 17:57:16 +00:00
/**
* ---------------------------------------------------
*/
export const fetchWalletHistoryHyperSuperPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_HYPER_SUPER_PENDING
2020-10-16 17:57:16 +00:00
});
export const fetchWalletHistoryHyperSuperReset = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_HYPER_SUPER__RESET
2020-10-16 17:57:16 +00:00
});
export const fetchWalletHistoryHyperSuperSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_HYPER_SUPER__SUCCESS,
result: res,
2020-10-16 17:57:16 +00:00
});
export const fetchWalletHistoryHyperSuperError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_HISTORY_HYPER_SUPER__ERROR,
result: error
2020-10-16 17:57:16 +00:00
});
2020-07-02 14:35:00 +00:00
/**
* ---------------------------------------------------
*/
2020-04-28 09:22:36 +00:00
export const fetchWalletTransferCommissionPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_TRANSFER_COMMISSION_PENDING
2020-04-28 09:22:36 +00:00
});
2020-04-29 09:45:44 +00:00
export const walletTransferCommissionReset = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_TRANSFER_COMMISSION_RESET
2020-04-29 09:45:44 +00:00
});
2020-04-28 09:22:36 +00:00
export const fetchWalletTransferCommissionSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_TRANSFER_COMMISSION_SUCCESS,
result: res,
2020-04-28 09:22:36 +00:00
});
export const fetchWalletTransferCommssionError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_TRANSFER_COMMISSION_ERROR,
result: error
2020-05-03 09:16:24 +00:00
});
2020-07-02 14:35:00 +00:00
/**
* ---------------------------------------------------
*/
2020-05-03 09:16:24 +00:00
export const fetchWalletGetCommissionPending = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_GET_COMMISSION_PENDING
2020-05-03 09:16:24 +00:00
});
export const walletGetCommissionReset = () => ({
2020-11-18 11:22:53 +00:00
type: WALLET_GET_COMMISSION_RESET
2020-05-03 09:16:24 +00:00
});
export const fetchWalletGetCommissionSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_GET_COMMISSION_SUCCESS,
result: res,
2020-05-03 09:16:24 +00:00
});
export const fetchWalleGetCommissionError = (error) => ({
2020-11-18 11:22:53 +00:00
type: WALLET_GET_COMMISSION_ERROR,
result: error
2020-05-03 09:16:24 +00:00
});
2020-07-02 14:35:00 +00:00
/**
* ---------------------------------------------------
*/
export const fetchLinkCardPending = () => ({
2020-11-18 11:22:53 +00:00
type: LINK_CARD_PENDING
2020-07-02 14:35:00 +00:00
});
export const fetchLinkCardReset = () => ({
2020-11-18 11:22:53 +00:00
type: LINK_CARD_RESET
2020-07-02 14:35:00 +00:00
});
export const fetchLinkCardSuccess = (res) => ({
2020-11-18 11:22:53 +00:00
type: LINK_CARD_SUCCESS,
result: res,
2020-07-02 14:35:00 +00:00
});
export const fetchLinkCardError = (error) => ({
2020-11-18 11:22:53 +00:00
type: LINK_CARD_ERROR,
result: error
2020-07-02 14:35:00 +00:00
});
2020-05-03 09:16:24 +00:00
/* export const fetchWalletGetRetraitCommissionPending = () => ({
type: WALLET_GET_RETREAIT_COMMISSION_PENDING
});
export const walletGetRetraitCommissionReset = () => ({
type: WALLET_GET_RETREAIT_COMMISSION_RESET
});
export const fetchWalletGetRetraitCommissionSuccess = (res) => ({
type: WALLET_GET_RETREAIT_COMMISSION_SUCCESS,
result: res,
});
export const fetchWalleGetRetraitCommissionError = (error) => ({
type: WALLET_GET_RETREAIT_COMMISSION_ERROR,
result: error
2020-11-18 11:22:53 +00:00
}); */
/**
* ---------------------------------------------------
*/
export const fetchGetListOperatorPending = () => ({
type: GET_OPERATOR_LIST_PENDING
});
export const fetchGetListOperatorReset = () => ({
type: GET_OPERATOR_LIST_RESET
});
export const fetchGetListOperatorSuccess = (res) => ({
type: GET_OPERATOR_LIST_SUCCESS,
result: res,
});
export const fetchGetListOperatorError = (error) => ({
type: GET_OPERATOR_LIST_ERROR,
result: error
});