updating credit amount functionality

This commit is contained in:
2026-07-05 00:01:19 +02:00
parent 6d48472425
commit a4d210393e
2 changed files with 12 additions and 3 deletions

View File

@@ -35,6 +35,10 @@ public class TransactionService {
private final CurrencyService currencyService;
public BigDecimal calculateCurrencyExchangeValue(CurrencyType from, CurrencyType to, BigDecimal amount) {
if (to == null) {
return BigDecimal.ZERO;
}
Currency debitCurrency = currencyService.findCurrencyByIsoCode(from.name());
Currency creditCurrency = currencyService.findCurrencyByIsoCode(to.name());