Signed Offers view only appears for arbitrator

This commit is contained in:
woodser 2023-04-19 08:04:12 -04:00
parent d6122020f2
commit d0a6646bcd

View file

@ -163,10 +163,17 @@ public class SupportView extends ActivatableView<TabPane, Void> {
// In case a arbitrator has become inactive he still might get disputes from pending trades
boolean hasDisputesAsArbitrator = arbitrationManager.getDisputesAsObservableList().stream()
.anyMatch(d -> d.getAgentPubKeyRing().equals(myPubKeyRing));
if (arbitratorTab == null && (isActiveArbitrator || hasDisputesAsArbitrator)) {
arbitratorTab = new Tab();
arbitratorTab.setClosable(false);
root.getTabs().add(arbitratorTab);
if (isActiveArbitrator || hasDisputesAsArbitrator) {
if (arbitratorTab == null) {
arbitratorTab = new Tab();
arbitratorTab.setClosable(false);
root.getTabs().add(arbitratorTab);
}
if (signedOfferTab == null) {
signedOfferTab = new Tab();
signedOfferTab.setClosable(false);
root.getTabs().add(signedOfferTab);
}
}
}
@ -183,12 +190,6 @@ public class SupportView extends ActivatableView<TabPane, Void> {
}
}
if (signedOfferTab == null) {
signedOfferTab = new Tab();
signedOfferTab.setClosable(false);
root.getTabs().add(signedOfferTab);
}
boolean isActiveRefundAgent = refundAgentManager.getObservableMap().values().stream()
.anyMatch(e -> e.getPubKeyRing() != null && e.getPubKeyRing().equals(myPubKeyRing));
if (refundAgentTab == null) {