close trader dispute ticket on payout published

This commit is contained in:
woodser 2023-12-15 09:57:47 -05:00
parent c42471191a
commit 48d902b58d

View File

@ -648,7 +648,10 @@ public abstract class Trade implements Tradable, Model {
}).start();
// complete disputed trade
if (getDisputeState().isArbitrated() && !getDisputeState().isClosed()) processModel.getTradeManager().closeDisputedTrade(getId(), Trade.DisputeState.DISPUTE_CLOSED);
if (getDisputeState().isArbitrated() && !getDisputeState().isClosed()) {
processModel.getTradeManager().closeDisputedTrade(getId(), Trade.DisputeState.DISPUTE_CLOSED);
if (!isArbitrator()) for (Dispute dispute : getDisputes()) dispute.setIsClosed(); // auto close trader tickets
}
// auto complete arbitrator trade
if (isArbitrator() && !isCompleted()) processModel.getTradeManager().onTradeCompleted(this);