import { Map } from "immutable" ; import { AnyAction } from "redux" ; import { TxDataAll } from "@joincivil/typescript-types" ; import { challengeActions } from "../actionCreators/challenges" ; export function grantAppealTxs ( state = Map < string , TxDataAll > ( ) , action ) { switch ( action . type ) { case challengeActions . ADD_GRANT_APPEAL_TX : return state . set ( action . data . listingAddress , action . data . txData ) ; default : return state ; } } export function grantAppealTxsFetching ( state = Map < string , boolean > ( ) , action ) { switch ( action . type ) { case challengeActions . FETCH_GRANT_APPEAL_TX : return state . set ( action . data . listingAddress , true ) ; default : return state ; } }