updating credit amount functionality
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user