1
0
mirror of https://github.com/Qortal/qortal.git synced 2025-03-13 19:12:33 +00:00

Skip finished ATs in the refund API endpoints.

This commit is contained in:
CalDescent 2021-08-11 21:26:29 +01:00
parent 1752386a6c
commit f71516f36f

@ -561,6 +561,11 @@ public class CrossChainHtlcResource {
if (atData == null)
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.ADDRESS_UNKNOWN);
if (atData.getIsFinished()) {
LOGGER.info(String.format("Skipping finished AT %s", atAddress));
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA);
}
ACCT acct = SupportedBlockchain.getAcctByCodeHash(atData.getCodeHash());
if (acct == null)
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_CRITERIA);