diff --git a/core/src/main/java/haveno/core/trade/ClosedTradableUtil.java b/core/src/main/java/haveno/core/trade/ClosedTradableUtil.java index 1df4dbd00a..82c9a29239 100644 --- a/core/src/main/java/haveno/core/trade/ClosedTradableUtil.java +++ b/core/src/main/java/haveno/core/trade/ClosedTradableUtil.java @@ -41,6 +41,14 @@ public class ClosedTradableUtil { public static Map getTotalVolumeByCurrency(List tradableList) { Map map = new HashMap<>(); tradableList.stream() + .filter(tradable -> { + if (tradable instanceof Trade) { + Trade trade = castToTrade(tradable); + return trade.isCompleted(); // TODO: does not consider if trade was reverted by arbitrator + } else { + return false; + } + }) .flatMap(tradable -> tradable.getOptionalVolume().stream()) .forEach(volume -> { String currencyCode = volume.getCurrencyCode(); diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index e6290cb58f..6e774ad152 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -2180,7 +2180,7 @@ public abstract class Trade implements Tradable, Model { return tradeAmountTransferred(); } - private boolean tradeAmountTransferred() { + public boolean tradeAmountTransferred() { return isPaymentReceived() || (getDisputeResult() != null && getDisputeResult().getWinner() == DisputeResult.Winner.SELLER); }