You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/src/app/clightning/store/cl.reducers.ts

31 lines
625 B
TypeScript

import { GetInfoCL, FeesCL } from '../../shared/models/clModels';
import * as RTLActions from '../../store/rtl.actions';
export interface CLState {
information: GetInfoCL;
fees: FeesCL;
}
export const initCLState: CLState = {
information: {},
fees: {}
}
export function CLReducer(state = initCLState, action: RTLActions.RTLActions) {
switch (action.type) {
case RTLActions.SET_CL_INFO:
return {
...state,
information: action.payload
};
case RTLActions.SET_CL_FEES:
return {
...state,
fees: action.payload
};
default:
return state;
}
}