web-installer/src/redux/reducers/cosmosChainsReducer.js
// Reducers to add and remove from list of all cosmos nodes
Reducers to add and remove from list of all cosmos nodes
Reducers to add and remove from list of all cosmos nodes
function allNodes(state = [], action) {
  switch (action.type) {
    case ADD_NODE_COSMOS:
      if (state.includes(action.payload.id)) {
        return state;
      }
      return state.concat(action.payload.id);
    case REMOVE_NODE_COSMOS:
      return state.filter((config) => config !== action.payload.id);
    default:
      return state;
  }
}
function allNodes ( state = [ ] , action ) { switch ( action . type ) { case ADD_NODE_COSMOS : if ( state . includes ( action . payload . id ) ) { return state ; } return state . concat ( action . payload . id ) ; case REMOVE_NODE_COSMOS : return state . filter ( ( config ) => config !== action . payload . id ) ; default : return state ; } }
Reducers to add and remove from list of all cosmos nodes
Reducers to add and remove from list of all cosmos nodes