import { EXCHANGE_SET } from "../../actions/exchange/exchangeActionConstants"
import createReducer from "../../utils/createReducer"

const initialState = {
    exchange: {}
}

export default createReducer(
    {
        [EXCHANGE_SET]: setExchange,
    },
    initialState
)

function setExchange(state, action) {
    return {
        ...state,
        exchange: action.payload
    }
}