verify arbitrator signature when dispute closed

This commit is contained in:
woodser 2023-01-15 11:23:46 -05:00
parent 435fc164b2
commit 9260cf53ee
15 changed files with 76 additions and 88 deletions

View file

@ -21,8 +21,7 @@ import bisq.desktop.main.overlays.Overlay;
import bisq.core.locale.Res;
import bisq.core.support.dispute.DisputeSummaryVerification;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
@ -43,12 +42,10 @@ import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
public class VerifyDisputeResultSignatureWindow extends Overlay<VerifyDisputeResultSignatureWindow> {
private TextArea textArea;
private TextField resultTextField;
private final MediatorManager mediatorManager;
private final RefundAgentManager refundAgentManager;
private final ArbitratorManager arbitratorManager;
public VerifyDisputeResultSignatureWindow(MediatorManager mediatorManager, RefundAgentManager refundAgentManager) {
this.mediatorManager = mediatorManager;
this.refundAgentManager = refundAgentManager;
public VerifyDisputeResultSignatureWindow(ArbitratorManager arbitratorManager) {
this.arbitratorManager = arbitratorManager;
type = Type.Attention;
}
@ -68,9 +65,12 @@ public class VerifyDisputeResultSignatureWindow extends Overlay<VerifyDisputeRes
display();
textArea.textProperty().addListener((observable, oldValue, newValue) -> {
resultTextField.setText(DisputeSummaryVerification.verifySignature(newValue,
mediatorManager,
refundAgentManager));
try {
DisputeSummaryVerification.verifySignature(newValue, arbitratorManager);
resultTextField.setText(Res.get("support.sigCheck.popup.success"));
} catch (Exception e) {
resultTextField.setText(e.getMessage());
}
});
}

View file

@ -44,9 +44,8 @@ import bisq.core.support.dispute.DisputeManager;
import bisq.core.support.dispute.DisputeResult;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.agent.DisputeAgentLookupMap;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.support.dispute.mediation.MediationManager;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.messages.ChatMessage;
import bisq.core.trade.Contract;
import bisq.core.trade.Trade;
@ -157,8 +156,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> {
private final TradeDetailsWindow tradeDetailsWindow;
private final AccountAgeWitnessService accountAgeWitnessService;
private final MediatorManager mediatorManager;
private final RefundAgentManager refundAgentManager;
private final ArbitratorManager arbitratorManager;
private final boolean useDevPrivilegeKeys;
protected TableView<Dispute> tableView;
@ -198,8 +196,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
boolean useDevPrivilegeKeys) {
this.disputeManager = disputeManager;
this.keyRing = keyRing;
@ -211,8 +208,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> {
this.contractWindow = contractWindow;
this.tradeDetailsWindow = tradeDetailsWindow;
this.accountAgeWitnessService = accountAgeWitnessService;
this.mediatorManager = mediatorManager;
this.refundAgentManager = refundAgentManager;
this.arbitratorManager = arbitratorManager;
this.useDevPrivilegeKeys = useDevPrivilegeKeys;
DisputeChatPopup.ChatCallback chatCallback = this::handleOnProcessDispute;
chatPopup = new DisputeChatPopup(disputeManager, formatter, preferences, chatCallback);
@ -286,7 +282,7 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> {
sigCheckButton = new AutoTooltipButton(Res.get("support.sigCheck.button"));
HBox.setHgrow(sigCheckButton, Priority.NEVER);
sigCheckButton.setOnAction(e -> {
new VerifyDisputeResultSignatureWindow(mediatorManager, refundAgentManager).show();
new VerifyDisputeResultSignatureWindow(arbitratorManager).show();
});
Pane spacer = new Pane();

View file

@ -31,8 +31,7 @@ import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeList;
import bisq.core.support.dispute.DisputeManager;
import bisq.core.support.dispute.agent.MultipleHolderNameDetection;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.trade.TradeDataValidation;
import bisq.core.trade.TradeManager;
import bisq.core.user.DontShowAgainLookup;
@ -79,8 +78,7 @@ public abstract class DisputeAgentView extends DisputeView implements MultipleHo
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
boolean useDevPrivilegeKeys) {
super(disputeManager,
keyRing,
@ -92,8 +90,7 @@ public abstract class DisputeAgentView extends DisputeView implements MultipleHo
contractWindow,
tradeDetailsWindow,
accountAgeWitnessService,
mediatorManager,
refundAgentManager,
arbitratorManager,
useDevPrivilegeKeys);
multipleHolderNameDetection = new MultipleHolderNameDetection(disputeManager);

View file

@ -30,8 +30,7 @@ import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.arbitration.ArbitrationManager;
import bisq.core.support.dispute.arbitration.ArbitrationSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
@ -57,8 +56,7 @@ public class ArbitratorView extends DisputeAgentView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(arbitrationManager,
keyRing,
@ -70,8 +68,7 @@ public class ArbitratorView extends DisputeAgentView {
contractWindow,
tradeDetailsWindow,
accountAgeWitnessService,
mediatorManager,
refundAgentManager,
arbitratorManager,
useDevPrivilegeKeys);
}

View file

@ -28,10 +28,9 @@ import bisq.core.alert.PrivateNotificationManager;
import bisq.core.support.SupportType;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.support.dispute.mediation.MediationManager;
import bisq.core.support.dispute.mediation.MediationSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
@ -57,8 +56,7 @@ public class MediatorView extends DisputeAgentView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(mediationManager,
keyRing,
@ -70,8 +68,7 @@ public class MediatorView extends DisputeAgentView {
contractWindow,
tradeDetailsWindow,
accountAgeWitnessService,
mediatorManager,
refundAgentManager,
arbitratorManager,
useDevPrivilegeKeys);
}

View file

@ -30,10 +30,9 @@ import bisq.core.locale.Res;
import bisq.core.support.SupportType;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.support.dispute.refund.RefundManager;
import bisq.core.support.dispute.refund.RefundSession;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
@ -59,8 +58,7 @@ public class RefundAgentView extends DisputeAgentView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorService,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(refundManager,
keyRing,
@ -72,8 +70,7 @@ public class RefundAgentView extends DisputeAgentView {
contractWindow,
tradeDetailsWindow,
accountAgeWitnessService,
mediatorManager,
refundAgentManager,
arbitratorService,
useDevPrivilegeKeys);
}

View file

@ -27,8 +27,7 @@ import bisq.core.alert.PrivateNotificationManager;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeList;
import bisq.core.support.dispute.DisputeManager;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
import bisq.core.util.coin.CoinFormatter;
@ -46,12 +45,10 @@ public abstract class DisputeClientView extends DisputeView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
boolean useDevPrivilegeKeys) {
super(DisputeManager, keyRing, tradeManager, formatter, preferences, disputeSummaryWindow, privateNotificationManager,
contractWindow, tradeDetailsWindow, accountAgeWitnessService,
mediatorManager, refundAgentManager, useDevPrivilegeKeys);
contractWindow, tradeDetailsWindow, accountAgeWitnessService, arbitratorManager, useDevPrivilegeKeys);
}
@Override

View file

@ -30,8 +30,7 @@ import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.arbitration.ArbitrationManager;
import bisq.core.support.dispute.arbitration.ArbitrationSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
@ -56,12 +55,11 @@ public class ArbitrationClientView extends DisputeClientView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(arbitrationManager, keyRing, tradeManager, formatter, preferences, disputeSummaryWindow,
privateNotificationManager, contractWindow, tradeDetailsWindow, accountAgeWitnessService,
mediatorManager, refundAgentManager, useDevPrivilegeKeys);
arbitratorManager, useDevPrivilegeKeys);
}
@Override

View file

@ -30,10 +30,9 @@ import bisq.core.locale.Res;
import bisq.core.support.SupportType;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.support.dispute.mediation.MediationManager;
import bisq.core.support.dispute.mediation.MediationSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.trade.Contract;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
@ -61,12 +60,11 @@ public class MediationClientView extends DisputeClientView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(mediationManager, keyRing, tradeManager, formatter, preferences, disputeSummaryWindow,
privateNotificationManager, contractWindow, tradeDetailsWindow, accountAgeWitnessService,
mediatorManager, refundAgentManager, useDevPrivilegeKeys);
arbitratorManager, useDevPrivilegeKeys);
}
@Override

View file

@ -28,10 +28,9 @@ import bisq.core.alert.PrivateNotificationManager;
import bisq.core.support.SupportType;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeSession;
import bisq.core.support.dispute.mediation.mediator.MediatorManager;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.support.dispute.refund.RefundManager;
import bisq.core.support.dispute.refund.RefundSession;
import bisq.core.support.dispute.refund.refundagent.RefundAgentManager;
import bisq.core.trade.Contract;
import bisq.core.trade.TradeManager;
import bisq.core.user.Preferences;
@ -59,12 +58,11 @@ public class RefundClientView extends DisputeClientView {
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
MediatorManager mediatorManager,
RefundAgentManager refundAgentManager,
ArbitratorManager arbitratorManager,
@Named(Config.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
super(refundManager, keyRing, tradeManager, formatter, preferences, disputeSummaryWindow,
privateNotificationManager, contractWindow, tradeDetailsWindow, accountAgeWitnessService,
mediatorManager, refundAgentManager, useDevPrivilegeKeys);
arbitratorManager, useDevPrivilegeKeys);
}
@Override