FINERACT-1157:UnsupportedOperationException at InteropServiceImpl
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
e43be716ae
commit
ce825c912d
+2
-2
@@ -558,7 +558,7 @@ public class InteropServiceImpl implements InteropService {
|
|||||||
MoneyData requestFee = request.getFspFee();
|
MoneyData requestFee = request.getFspFee();
|
||||||
if (requestFee != null) {
|
if (requestFee != null) {
|
||||||
if (!savingsAccount.getCurrency().getCode().equals(requestFee.getCurrency())) {
|
if (!savingsAccount.getCurrency().getCode().equals(requestFee.getCurrency())) {
|
||||||
throw new UnsupportedOperationException();
|
throw new HttpClientErrorException(HttpStatus.resolve(400));
|
||||||
}
|
}
|
||||||
// TODO: compare with calculated quote fee
|
// TODO: compare with calculated quote fee
|
||||||
total = MathUtil.add(total, requestFee.getAmount());
|
total = MathUtil.add(total, requestFee.getAmount());
|
||||||
@@ -566,7 +566,7 @@ public class InteropServiceImpl implements InteropService {
|
|||||||
MoneyData requestCommission = request.getFspCommission();
|
MoneyData requestCommission = request.getFspCommission();
|
||||||
if (requestCommission != null) {
|
if (requestCommission != null) {
|
||||||
if (!savingsAccount.getCurrency().getCode().equals(requestCommission.getCurrency())) {
|
if (!savingsAccount.getCurrency().getCode().equals(requestCommission.getCurrency())) {
|
||||||
throw new UnsupportedOperationException();
|
throw new HttpClientErrorException(HttpStatus.resolve(400));
|
||||||
}
|
}
|
||||||
// TODO: compare with calculated quote commission
|
// TODO: compare with calculated quote commission
|
||||||
total = MathUtil.subtractToZero(total, requestCommission.getAmount());
|
total = MathUtil.subtractToZero(total, requestCommission.getAmount());
|
||||||
|
|||||||
Reference in New Issue
Block a user