register arbitrator from api and use throughout trade

This commit is contained in:
woodser 2022-04-26 19:55:48 -04:00
parent c2f5adac9b
commit 716f62797d
15 changed files with 99 additions and 39 deletions

View file

@ -125,7 +125,13 @@ public class AccountView extends ActivatableView<TabPane, Void> {
};
keyEventEventHandler = event -> {
if (Utilities.isAltOrCtrlPressed(KeyCode.D, event) && mediatorRegistrationTab == null) {
if (Utilities.isAltOrCtrlPressed(KeyCode.R, event) && arbitratorRegistrationTab == null) {
closeOtherExtraTabs(arbitratorRegistrationTab);
arbitratorRegistrationTab = new Tab(Res.get("account.tab.arbitratorRegistration").toUpperCase());
arbitratorRegistrationTab.setClosable(true);
root.getTabs().add(arbitratorRegistrationTab);
navigation.navigateTo(MainView.class, AccountView.class, ArbitratorRegistrationView.class);
} else if (Utilities.isAltOrCtrlPressed(KeyCode.D, event) && mediatorRegistrationTab == null) {
closeOtherExtraTabs(mediatorRegistrationTab);
mediatorRegistrationTab = new Tab(Res.get("account.tab.mediatorRegistration").toUpperCase());
mediatorRegistrationTab.setClosable(true);

View file

@ -782,15 +782,9 @@ public class GUIUtil {
public static boolean canCreateOrTakeOfferOrShowPopup(User user, Navigation navigation) {
// TODO (woodser): use refund agents to dispute arbitration?
if (!user.hasAcceptedRefundAgents()) {
log.warn("There are no refund agents available"); // TODO (woodser): refund agents changing from [4444] to [] causing this error
//new Popup().warning(Res.get("popup.warning.noArbitratorsAvailable")).show();
//return false;
}
if (!user.hasAcceptedMediators()) {
new Popup().warning(Res.get("popup.warning.noMediatorsAvailable")).show();
if (!user.hasAcceptedArbitrators()) {
log.warn("There are no arbitrators available");
new Popup().warning(Res.get("popup.warning.noArbitratorsAvailable")).show();
return false;
}