web-installer/src/redux/reducers/cosmosChainsReducer.js
// Reducers to add and remove cosmos node configurations from global state
Reducers to add and remove cosmos node configurations from global state
Reducers to add and remove cosmos node configurations from global state
function nodesById(state = {}, action) {
  switch (action.type) {
    case ADD_NODE_COSMOS:
      return {
        ...state,
        [action.payload.id]: action.payload,
      };
    case REMOVE_NODE_COSMOS:
      return _.omit(state, action.payload.id);
    default:
      return state;
  }
}
function nodesById ( state = { } , action ) { switch ( action . type ) { case ADD_NODE_COSMOS : return { ... state , [ action . payload . id ] : action . payload , } ; case REMOVE_NODE_COSMOS : return _ . omit ( state , action . payload . id ) ; default : return state ; } }
Reducers to add and remove cosmos node configurations from global state
Reducers to add and remove cosmos node configurations from global state