import { Coin } from "../models/coins/coin.model" ; export interface State { error : string ; loading : boolean ; initiateData : any ; link : string ; coins : { receiveCoin : Coin ; depositCoin : Coin ; } ; } export const initialState = { error : undefined , loading : false , initiateData : undefined , link : undefined , coins : { receiveCoin : undefined , depositCoin : undefined , } , } ; export function reducer ( state = initialState , action ) { switch ( action . type ) { default : { return state ; } } } export const getInititeError = ( state ) => state . error ; export const getInitiateLoading = ( state ) => state . loading ; export const getInitiateData = ( state ) => state . initiateData ; export const getSwapCoins = ( state ) => state . coins ;