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