import { Action } from '@ngrx/store' ; import { InformInitiatedDataModel } from "../models/inform-initiated-data.model" ; import { InformParticipatedDataModel } from "../models/inform-participated-data.model" ; import { ParticipateData } from "../models/factory-participated-data" ; import { Coin } from '../models/coins/coin.model' ; export const SWAP_DEPOSIT_RECEIVE_COINS = 'SWAP_DEPOSIT_RECEIVE_COINS' ; export const SET_DEPOSIT_COIN = "SET_DEPOSIT_COIN" ; export const SET_RECEIVE_COIN = "SET_RECEIVE_COIN" ; export const START_SWAP = 'START_SWAP' ; export const SET_LINK = 'SET_LINK' ; export const WAIT_FOR_INITIATE = 'WAIT_FOR_INITIATE' ; export const WAIT_FOR_INITIATE_SUCCESS = 'WAIT_FOR_INITIATE_SUCCESS' ; export const INFORM_INITIATED = 'INFORM_INITIATED' ; export const PARTICIPATE_SUCCESS = 'PARTICIPATE_SUCCESS' ; export const INFORM_PARTICIPATED = 'INFORM_PARTICIPATED' ; export const WAIT_FOR_PARTICIPATE_SUCCESS = 'WAIT_FOR_PARTICIPATE_SUCCESS' ; export const SET_DEPOSIT_AMOUNT = 'SET_DEPOSIT_AMOUNT' ; export const SET_RECEIVE_AMOUNT = 'SET_RECEIVE_AMOUNT' ; export const SET_ACTIVE_STEP = 'SET_ACTIVE_STEP' ; export const COMPLETE_SWAP = 'COMPLETE_SWAP' ; export const REDEEM_SUCCESS = 'REDEEM_SUCCESS' ; export class SwapDepositReceiveCoinsAction implements Action { readonly type = SWAP_DEPOSIT_RECEIVE_COINS ; } export class setDepositCoinAction implements Action { readonly type = SET_DEPOSIT_COIN ; constructor ( public payload ) { } } export class setReceiveCoinAction implements Action { readonly type = SET_RECEIVE_COIN ; constructor ( public payload ) { } } export class StartSwapAction implements Action { readonly type = START_SWAP ; constructor ( public payload ) { } } export class SetLinkAction implements Action { readonly type = SET_LINK ; constructor ( public payload ) { } } export class SetActiveStepAction implements Action { readonly type = SET_ACTIVE_STEP ; constructor ( public payload ) { } } export class SetDepositAmountAction implements Action { readonly type = SET_DEPOSIT_AMOUNT ; constructor ( public payload ) { } } export class SetReceiveAmountAction implements Action { readonly type = SET_RECEIVE_AMOUNT ; constructor ( public payload ) { } } export class CompleteSwapAction implements Action { readonly type = COMPLETE_SWAP ; constructor ( ) { } } export class WaitForInitiateAction implements Action { readonly type = WAIT_FOR_INITIATE ; constructor ( public payload ) { } } export class WaitForInitiateSuccessAction implements Action { readonly type = WAIT_FOR_INITIATE_SUCCESS ; constructor ( public payload ) { } } export class InformInitiatedAction implements Action { readonly type = INFORM_INITIATED ; constructor ( public payload ) { } } export class ParticipateSuccessAction implements Action { readonly type = PARTICIPATE_SUCCESS ; constructor ( public payload ) { console . log ( PARTICIPATE_SUCCESS , payload ) ; } } export class InformParticipatedAction implements Action { readonly type = INFORM_PARTICIPATED ; constructor ( public payload ) { } } export class WaitForParticipateSuccessAction implements Action { readonly type = WAIT_FOR_PARTICIPATE_SUCCESS ; constructor ( public payload ) { } } export class RedeemSuccessAction implements Action { readonly type = REDEEM_SUCCESS ; constructor ( public payload ? ) { } } export type Actions = SwapDepositReceiveCoinsAction | setDepositCoinAction | setReceiveCoinAction | StartSwapAction | SetLinkAction | SetActiveStepAction | SetDepositAmountAction | SetReceiveAmountAction | CompleteSwapAction | WaitForInitiateAction | InformInitiatedAction | WaitForInitiateSuccessAction | ParticipateSuccessAction | InformParticipatedAction | WaitForParticipateSuccessAction | RedeemSuccessAction ;