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