diff --git a/Fund-Transfer/src/main/java/org/training/fundtransfer/service/implementation/FundTransferServiceImpl.java b/Fund-Transfer/src/main/java/org/training/fundtransfer/service/implementation/FundTransferServiceImpl.java index ec9b911..2857c54 100644 --- a/Fund-Transfer/src/main/java/org/training/fundtransfer/service/implementation/FundTransferServiceImpl.java +++ b/Fund-Transfer/src/main/java/org/training/fundtransfer/service/implementation/FundTransferServiceImpl.java @@ -65,7 +65,7 @@ public FundTransferResponse fundTransfer(FundTransferRequest fundTransferRequest log.error("account status is pending or inactive, please update the account status"); throw new AccountUpdateException("account is status is :pending", GlobalErrorCode.NOT_ACCEPTABLE); } - if (fromAccount.getAvailableBalance().compareTo(fundTransferRequest.getAmount()) <= 0) { + if (fromAccount.getAvailableBalance().compareTo(fundTransferRequest.getAmount()) < 0) { log.error("required amount to transfer is not available"); throw new InsufficientBalance("requested amount is not available", GlobalErrorCode.NOT_ACCEPTABLE); }