2017-06-19 23:35:14 +00:00
|
|
|
import {
|
|
|
|
SWAP_DESTINATION_AMOUNT,
|
|
|
|
SWAP_DESTINATION_KIND,
|
|
|
|
SWAP_ORIGIN_AMOUNT,
|
|
|
|
SWAP_ORIGIN_KIND,
|
2017-06-24 01:25:12 +00:00
|
|
|
SWAP_UPDATE_BITY_RATES,
|
2017-06-24 06:08:33 +00:00
|
|
|
SWAP_PART_ONE_COMPLETE,
|
2017-07-02 05:45:22 +00:00
|
|
|
SWAP_PART_TWO_COMPLETE,
|
|
|
|
SWAP_DESTINATION_ADDRESS,
|
|
|
|
SWAP_RESTART
|
2017-06-19 23:35:14 +00:00
|
|
|
} from './swapConstants';
|
2017-06-12 01:00:28 +00:00
|
|
|
|
2017-06-20 06:28:22 +00:00
|
|
|
export const originKindSwap = value => {
|
2017-06-19 05:39:07 +00:00
|
|
|
return {
|
|
|
|
type: SWAP_ORIGIN_KIND,
|
2017-06-19 23:47:11 +00:00
|
|
|
value
|
2017-06-19 05:39:07 +00:00
|
|
|
};
|
2017-06-12 01:00:28 +00:00
|
|
|
};
|
|
|
|
|
2017-06-20 06:28:22 +00:00
|
|
|
export const destinationKindSwap = value => {
|
2017-06-19 05:39:07 +00:00
|
|
|
return {
|
|
|
|
type: SWAP_DESTINATION_KIND,
|
2017-06-19 23:47:11 +00:00
|
|
|
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
|
|
|
|
2017-06-20 06:28:22 +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
|
|
|
};
|
|
|
|
|
2017-06-20 06:28:22 +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
|
|
|
|
2017-06-20 06:28:22 +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
|
|
|
};
|
2017-06-24 01:25:12 +00:00
|
|
|
|
|
|
|
export const partOneCompleteSwap = (value: boolean) => {
|
|
|
|
return {
|
|
|
|
type: SWAP_PART_ONE_COMPLETE,
|
|
|
|
value
|
|
|
|
};
|
|
|
|
};
|
2017-06-24 06:08:33 +00:00
|
|
|
|
2017-07-02 05:45:22 +00:00
|
|
|
export const partTwoCompleteSwap = (value: boolean) => {
|
2017-06-24 06:08:33 +00:00
|
|
|
return {
|
2017-07-02 05:45:22 +00:00
|
|
|
type: SWAP_PART_TWO_COMPLETE,
|
2017-06-24 06:08:33 +00:00
|
|
|
value
|
|
|
|
};
|
|
|
|
};
|
2017-07-02 05:45:22 +00:00
|
|
|
|
|
|
|
export const destinationAddressSwap = value => {
|
|
|
|
return {
|
|
|
|
type: SWAP_DESTINATION_ADDRESS,
|
|
|
|
value
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const restartSwap = () => {
|
|
|
|
return {
|
|
|
|
type: SWAP_RESTART
|
|
|
|
};
|
|
|
|
};
|