MyCrypto/common/actions/swap.js

81 lines
1.3 KiB
JavaScript
Raw Normal View History

import {
SWAP_DESTINATION_AMOUNT,
SWAP_DESTINATION_KIND,
SWAP_ORIGIN_AMOUNT,
SWAP_ORIGIN_KIND,
SWAP_UPDATE_BITY_RATES,
SWAP_PART_ONE_COMPLETE,
2017-07-01 22:45:22 -07:00
SWAP_PART_TWO_COMPLETE,
SWAP_DESTINATION_ADDRESS,
SWAP_RESTART,
SWAP_LOAD_BITY_RATES
} from './swapConstants';
2017-06-11 18:00:28 -07:00
export const originKindSwap = value => {
2017-06-18 22:39:07 -07:00
return {
type: SWAP_ORIGIN_KIND,
value
2017-06-18 22:39:07 -07:00
};
2017-06-11 18:00:28 -07:00
};
export const destinationKindSwap = value => {
2017-06-18 22:39:07 -07:00
return {
type: SWAP_DESTINATION_KIND,
value
2017-06-18 22:39:07 -07:00
};
2017-06-18 17:56:11 -07:00
};
2017-06-11 18:00:28 -07:00
export const originAmountSwap = value => {
2017-06-18 22:39:07 -07:00
return {
type: SWAP_ORIGIN_AMOUNT,
value
};
2017-06-11 18:00:28 -07:00
};
export const destinationAmountSwap = value => {
2017-06-18 22:39:07 -07:00
return {
type: SWAP_DESTINATION_AMOUNT,
value
};
2017-06-18 17:56:11 -07:00
};
2017-06-11 18:00:28 -07:00
export const updateBityRatesSwap = value => {
2017-06-18 22:39:07 -07:00
return {
type: SWAP_UPDATE_BITY_RATES,
value
};
2017-06-18 17:56:11 -07:00
};
export const partOneCompleteSwap = (value: boolean) => {
return {
type: SWAP_PART_ONE_COMPLETE,
value
};
};
2017-07-01 22:45:22 -07:00
export const partTwoCompleteSwap = (value: boolean) => {
return {
2017-07-01 22:45:22 -07:00
type: SWAP_PART_TWO_COMPLETE,
value
};
};
2017-07-01 22:45:22 -07:00
export const destinationAddressSwap = value => {
return {
type: SWAP_DESTINATION_ADDRESS,
value
};
};
export const restartSwap = () => {
return {
type: SWAP_RESTART
};
};
export const loadBityRates = () => {
return {
type: SWAP_LOAD_BITY_RATES
};
};