Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -353,32 +353,6 @@ private CommandProcessingResult doTransactionForCashier(final Long cashierId, fi
final Cashier cashier = this.cashierRepository.findById(cashierId).orElseThrow(() -> new CashierNotFoundException(cashierId));

this.fromApiJsonDeserializer.validateForCashTxnForCashier(command.json());

// TODO: can we please remove this whole block?!? this is 20 lines of dead code!!!
final String entityType = command.stringValueOfParameterNamed("entityType");
if (entityType != null) {
if (entityType.equals("loan account")) {
// TODO : Check if loan account exists
// LoanAccount loan = null;
// if (loan == null) { throw new
// LoanAccountFoundException(entityId); }
} else if (entityType.equals("savings account")) {
// TODO : Check if loan account exists
// SavingsAccount savingsaccount = null;
// if (savingsaccount == null) { throw new
// SavingsAccountNotFoundException(entityId); }

}
if (entityType.equals("client")) {
// TODO: Check if client exists
// Client client = null;
// if (client == null) { throw new
// ClientNotFoundException(entityId); }
} else {
// TODO : Invalid type handling
}
}

final CashierTransaction cashierTxn = CashierTransaction.fromJson(cashier, command);
cashierTxn.setTxnType(txnType.getId());

Expand Down