import 'package:aman_kassa_flutter/redux/actions/bank_actions.dart';
import 'package:aman_kassa_flutter/redux/state/bank_state.dart';

bankReducer(BankState prevState, SetBankStateAction action) {
  final payload = action.bankState;
  return prevState.copyWith(
    login: payload.login ?? prevState.login,
    password: payload.password ?? prevState.password,
    session: payload.session ?? prevState.session,
    sessionType: payload.sessionType ?? prevState.sessionType,
    loading: null,
  );
}
