forked from Qortal/qortal
Skip over ARRR orders in /refundAll and /redeemAll, as ARRR support hasn't been added for these yet.
This should fix 500 error which could prevent forced refund attempts for LTC and other chains. It wouldn't have affected any normal trade-bot refund functionality.
This commit is contained in:
parent
0b8fcc0a7b
commit
6cfd85bdce
@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
@ -284,6 +285,12 @@ public class CrossChainHtlcResource {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bitcoiny bitcoiny = (Bitcoiny) acct.getBlockchain();
|
||||||
|
if (Objects.equals(bitcoiny.getCurrencyCode(), "ARRR")) {
|
||||||
|
LOGGER.info("Skipping AT {} because ARRR is currently unsupported", atAddress);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
CrossChainTradeData crossChainTradeData = acct.populateTradeData(repository, atData);
|
CrossChainTradeData crossChainTradeData = acct.populateTradeData(repository, atData);
|
||||||
if (crossChainTradeData == null) {
|
if (crossChainTradeData == null) {
|
||||||
LOGGER.info("Couldn't find crosschain trade data for AT {}", atAddress);
|
LOGGER.info("Couldn't find crosschain trade data for AT {}", atAddress);
|
||||||
@ -532,6 +539,11 @@ public class CrossChainHtlcResource {
|
|||||||
try {
|
try {
|
||||||
// Determine foreign blockchain receive address for refund
|
// Determine foreign blockchain receive address for refund
|
||||||
Bitcoiny bitcoiny = (Bitcoiny) acct.getBlockchain();
|
Bitcoiny bitcoiny = (Bitcoiny) acct.getBlockchain();
|
||||||
|
if (Objects.equals(bitcoiny.getCurrencyCode(), "ARRR")) {
|
||||||
|
LOGGER.info("Skipping AT {} because ARRR is currently unsupported", atAddress);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
String receivingAddress = bitcoiny.getUnusedReceiveAddress(tradeBotData.getForeignKey());
|
String receivingAddress = bitcoiny.getUnusedReceiveAddress(tradeBotData.getForeignKey());
|
||||||
|
|
||||||
LOGGER.info("Attempting to refund P2SH balance associated with AT {}...", atAddress);
|
LOGGER.info("Attempting to refund P2SH balance associated with AT {}...", atAddress);
|
||||||
|
Loading…
Reference in New Issue
Block a user