mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
trader can re-open dispute unless payout confirmed
This commit is contained in:
parent
5221782ba0
commit
59d8a8ee44
1 changed files with 107 additions and 107 deletions
|
@ -359,6 +359,13 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
|
|||
return;
|
||||
}
|
||||
|
||||
// skip if payout is confirmed
|
||||
if (trade.isPayoutConfirmed()) {
|
||||
String errorMsg = "Cannot open dispute because payout is already confirmed for " + trade.getClass().getSimpleName() + " " + trade.getId();
|
||||
faultHandler.handleFault(errorMsg, new IllegalStateException(errorMsg));
|
||||
return;
|
||||
}
|
||||
|
||||
synchronized (disputeList.getObservableList()) {
|
||||
if (disputeList.contains(dispute)) {
|
||||
String msg = "We got a dispute msg that we have already stored. TradeId = " + dispute.getTradeId() + ", DisputeId = " + dispute.getId();
|
||||
|
@ -368,8 +375,7 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
|
|||
}
|
||||
|
||||
Optional<Dispute> storedDisputeOptional = findDispute(dispute);
|
||||
boolean reOpen = storedDisputeOptional.isPresent() && storedDisputeOptional.get().isClosed();
|
||||
if (!storedDisputeOptional.isPresent() || reOpen) {
|
||||
boolean reOpen = storedDisputeOptional.isPresent();
|
||||
|
||||
// add or re-open dispute
|
||||
if (reOpen) {
|
||||
|
@ -472,12 +478,6 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
|
|||
errorMessage, new DisputeMessageDeliveryFailedException());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
String msg = "We got a dispute already open for that trade and trading peer.\n" +
|
||||
"TradeId = " + dispute.getTradeId();
|
||||
log.warn(msg);
|
||||
faultHandler.handleFault(msg, new DisputeAlreadyOpenException());
|
||||
}
|
||||
}
|
||||
|
||||
requestPersistence();
|
||||
|
|
Loading…
Reference in a new issue