MyCrypto/common/actions/swap.js

59 lines
972 B
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,
SWAP_RECEIVING_ADDRESS
} from './swapConstants';
2017-06-12 01:00:28 +00:00
export const originKindSwap = value => {
2017-06-19 05:39:07 +00:00
return {
type: SWAP_ORIGIN_KIND,
value
2017-06-19 05:39:07 +00:00
};
2017-06-12 01:00:28 +00:00
};
export const destinationKindSwap = value => {
2017-06-19 05:39:07 +00:00
return {
type: SWAP_DESTINATION_KIND,
value
2017-06-19 05:39:07 +00:00
};
2017-06-19 00:56:11 +00:00
};
2017-06-12 01:00:28 +00:00
export const originAmountSwap = value => {
2017-06-19 05:39:07 +00:00
return {
type: SWAP_ORIGIN_AMOUNT,
value
};
2017-06-12 01:00:28 +00:00
};
export const destinationAmountSwap = value => {
2017-06-19 05:39:07 +00:00
return {
type: SWAP_DESTINATION_AMOUNT,
value
};
2017-06-19 00:56:11 +00:00
};
2017-06-12 01:00:28 +00:00
export const updateBityRatesSwap = value => {
2017-06-19 05:39:07 +00:00
return {
type: SWAP_UPDATE_BITY_RATES,
value
};
2017-06-19 00:56:11 +00:00
};
export const partOneCompleteSwap = (value: boolean) => {
return {
type: SWAP_PART_ONE_COMPLETE,
value
};
};
export const receivingAddressSwap = value => {
return {
type: SWAP_RECEIVING_ADDRESS,
value
};
};