From e4046bd84eb1ea5f1aad9c8117e86b5c8e766f25 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 20 Dec 2022 13:57:57 +0000 Subject: [PATCH] fix dispute and trader chat button and states ui can open dispute after payment sent ui indicates if dispute opened by self or peer --- .../core/support/dispute/DisputeManager.java | 8 ++++---- core/src/main/java/bisq/core/trade/Trade.java | 1 + .../resources/i18n/displayStrings.properties | 3 ++- .../i18n/displayStrings_cs.properties | 2 +- .../i18n/displayStrings_de.properties | 2 +- .../i18n/displayStrings_es.properties | 2 +- .../i18n/displayStrings_fa.properties | 2 +- .../i18n/displayStrings_fr.properties | 2 +- .../i18n/displayStrings_it.properties | 2 +- .../i18n/displayStrings_ja.properties | 2 +- .../i18n/displayStrings_pt-br.properties | 2 +- .../i18n/displayStrings_pt.properties | 2 +- .../i18n/displayStrings_ru.properties | 2 +- .../i18n/displayStrings_th.properties | 2 +- .../i18n/displayStrings_vi.properties | 2 +- .../i18n/displayStrings_zh-hans.properties | 2 +- .../i18n/displayStrings_zh-hant.properties | 2 +- .../portfolio/pendingtrades/TradeStepInfo.java | 18 +++++++++--------- 18 files changed, 30 insertions(+), 28 deletions(-) diff --git a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java index 5c689997..c56e374e 100644 --- a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java +++ b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java @@ -565,8 +565,8 @@ public abstract class DisputeManager> extends Sup disputeFromOpener.getTradeId(), pubKeyRing.hashCode(), false, - !disputeFromOpener.isDisputeOpenerIsBuyer(), - !disputeFromOpener.isDisputeOpenerIsMaker(), + disputeFromOpener.isDisputeOpenerIsBuyer(), + disputeFromOpener.isDisputeOpenerIsMaker(), pubKeyRing, disputeFromOpener.getTradeDate().getTime(), disputeFromOpener.getTradePeriodEnd().getTime(), @@ -626,8 +626,8 @@ public abstract class DisputeManager> extends Sup // We mirrored dispute already! Contract contract = dispute.getContract(); - PubKeyRing peersPubKeyRing = dispute.isDisputeOpenerIsBuyer() ? contract.getBuyerPubKeyRing() : contract.getSellerPubKeyRing(); - NodeAddress peersNodeAddress = dispute.isDisputeOpenerIsBuyer() ? contract.getBuyerNodeAddress() : contract.getSellerNodeAddress(); + PubKeyRing peersPubKeyRing = dispute.isDisputeOpenerIsBuyer() ? contract.getSellerPubKeyRing() : contract.getBuyerPubKeyRing(); + NodeAddress peersNodeAddress = dispute.isDisputeOpenerIsBuyer() ? contract.getSellerNodeAddress() : contract.getBuyerNodeAddress(); DisputeOpenedMessage peerOpenedDisputeMessage = new DisputeOpenedMessage(dispute, p2PService.getAddress(), UUID.randomUUID().toString(), diff --git a/core/src/main/java/bisq/core/trade/Trade.java b/core/src/main/java/bisq/core/trade/Trade.java index ebc87e1e..40228db8 100644 --- a/core/src/main/java/bisq/core/trade/Trade.java +++ b/core/src/main/java/bisq/core/trade/Trade.java @@ -1072,6 +1072,7 @@ public abstract class Trade implements Tradable, Model { public void setPayoutTx(MoneroTxWallet payoutTx) { this.payoutTx = payoutTx; payoutTxId = payoutTx.getHash(); + if ("".equals(payoutTxId)) payoutTxId = null; // tx hash is empty until signed payoutTxKey = payoutTx.getKey(); } diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index f2f300a4..b68db8dd 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -882,13 +882,14 @@ portfolio.pending.support.button.getHelp=Open Trader Chat portfolio.pending.support.headline.halfPeriodOver=Check payment portfolio.pending.support.headline.periodOver=Trade period is over +portfolio.pending.arbitrationRequested=Arbitration requested portfolio.pending.mediationRequested=Mediation requested portfolio.pending.refundRequested=Refund requested portfolio.pending.openSupport=Open support ticket portfolio.pending.supportTicketOpened=Support ticket opened portfolio.pending.communicateWithArbitrator=Please communicate with the arbitrator on the \"Support\" screen. portfolio.pending.communicateWithMediator=Please communicate with the mediator on the \"Support\" screen. -portfolio.pending.disputeOpenedMyUser=You have already opened a dispute.\n{0} +portfolio.pending.disputeOpenedByUser=You have already opened a dispute.\n{0} portfolio.pending.disputeOpenedByPeer=Your trading peer opened a dispute\n{0} portfolio.pending.noReceiverAddressDefined=No receiver address defined diff --git a/core/src/main/resources/i18n/displayStrings_cs.properties b/core/src/main/resources/i18n/displayStrings_cs.properties index dcd0dcd3..8d37cd34 100644 --- a/core/src/main/resources/i18n/displayStrings_cs.properties +++ b/core/src/main/resources/i18n/displayStrings_cs.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Otevřít úkol pro podporu portfolio.pending.supportTicketOpened=Úkol pro podporu otevřen portfolio.pending.communicateWithArbitrator=Komunikujte prosím na obrazovce \"Podpora\" s rozhodcem. portfolio.pending.communicateWithMediator=Komunikujte prosím na obrazovce \"Podpora\" s mediátorem. -portfolio.pending.disputeOpenedMyUser=Už jste otevřeli spor.\n{0} +portfolio.pending.disputeOpenedByUser=Už jste otevřeli spor.\n{0} portfolio.pending.disputeOpenedByPeer=Váš obchodní partner otevřel spor\n{0} portfolio.pending.noReceiverAddressDefined=Není definována žádná adresa příjemce diff --git a/core/src/main/resources/i18n/displayStrings_de.properties b/core/src/main/resources/i18n/displayStrings_de.properties index cd7c8323..c210eed7 100644 --- a/core/src/main/resources/i18n/displayStrings_de.properties +++ b/core/src/main/resources/i18n/displayStrings_de.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Support-Ticket öffnen portfolio.pending.supportTicketOpened=Support-Ticket geöffnet portfolio.pending.communicateWithArbitrator=Bitte setzen Sie sich im \"Support\"-Bildschirm mit dem Vermittler in Verbindung. portfolio.pending.communicateWithMediator=Bitte kommunizieren Sie im \"Support\" Bildschirm mit dem Mediator. -portfolio.pending.disputeOpenedMyUser=Sie haben bereits einen Konflikt geöffnet.\n{0} +portfolio.pending.disputeOpenedByUser=Sie haben bereits einen Konflikt geöffnet.\n{0} portfolio.pending.disputeOpenedByPeer=Ihr Handelspartner hat einen Konflikt geöffnet\n{0} portfolio.pending.noReceiverAddressDefined=Keine Empfangsadresse festgelegt diff --git a/core/src/main/resources/i18n/displayStrings_es.properties b/core/src/main/resources/i18n/displayStrings_es.properties index a328c465..d28c108c 100644 --- a/core/src/main/resources/i18n/displayStrings_es.properties +++ b/core/src/main/resources/i18n/displayStrings_es.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Abrir ticket de soporte portfolio.pending.supportTicketOpened=Ticket de soporte abierto portfolio.pending.communicateWithArbitrator=Por favor, comuníquese en la pantalla de \"Soporte\" con el árbitro. portfolio.pending.communicateWithMediator=Por favor, comuníquese en la pantalla \"Soporte\" con el mediador. -portfolio.pending.disputeOpenedMyUser=Ya ha abierto una disputa.\n{0} +portfolio.pending.disputeOpenedByUser=Ya ha abierto una disputa.\n{0} portfolio.pending.disputeOpenedByPeer=Su pareja de intercambio ha abierto una disputa\n{0} portfolio.pending.noReceiverAddressDefined=No se ha definido la dirección del receptor. diff --git a/core/src/main/resources/i18n/displayStrings_fa.properties b/core/src/main/resources/i18n/displayStrings_fa.properties index 35faec87..85e32040 100644 --- a/core/src/main/resources/i18n/displayStrings_fa.properties +++ b/core/src/main/resources/i18n/displayStrings_fa.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=باز کردن تیکت پشتیبانی portfolio.pending.supportTicketOpened=تیکت پشتیبانی باز شد portfolio.pending.communicateWithArbitrator=لطفا در صفحه‌ی \"پشتیبانی\" با داور در ارتباط باشید. portfolio.pending.communicateWithMediator=Please communicate in the \"Support\" screen with the mediator. -portfolio.pending.disputeOpenedMyUser=شما در حال حاضر یک مناقشه باز کرده‌اید.\n{0} +portfolio.pending.disputeOpenedByUser=شما در حال حاضر یک مناقشه باز کرده‌اید.\n{0} portfolio.pending.disputeOpenedByPeer=طرف معامله شما یک مناقشه باز کرده است\n{0} portfolio.pending.noReceiverAddressDefined=آدرسی برای گیرنده تعیین نشده است diff --git a/core/src/main/resources/i18n/displayStrings_fr.properties b/core/src/main/resources/i18n/displayStrings_fr.properties index b4d69e05..6f275e3b 100644 --- a/core/src/main/resources/i18n/displayStrings_fr.properties +++ b/core/src/main/resources/i18n/displayStrings_fr.properties @@ -775,7 +775,7 @@ portfolio.pending.openSupport=Ouvrir un ticket d'assistance portfolio.pending.supportTicketOpened=Ticket d'assistance ouvert portfolio.pending.communicateWithArbitrator=Veuillez communiquer avec l'arbitre depuis l'écran "Support". portfolio.pending.communicateWithMediator=Veuillez communiquer avec le médiateur dans l'onglet \"Support \". -portfolio.pending.disputeOpenedMyUser=Vous avez déjà ouvert un litige.\n{0} +portfolio.pending.disputeOpenedByUser=Vous avez déjà ouvert un litige.\n{0} portfolio.pending.disputeOpenedByPeer=Votre pair de trading à ouvert un litige\n{0} portfolio.pending.noReceiverAddressDefined=Aucune adresse de destinataire définie diff --git a/core/src/main/resources/i18n/displayStrings_it.properties b/core/src/main/resources/i18n/displayStrings_it.properties index a3a2402c..813269dd 100644 --- a/core/src/main/resources/i18n/displayStrings_it.properties +++ b/core/src/main/resources/i18n/displayStrings_it.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Apri ticket di supporto portfolio.pending.supportTicketOpened=Ticket di supporto aperto portfolio.pending.communicateWithArbitrator=Si prega di comunicare nella schermata \"Supporto\" con l'arbitro. portfolio.pending.communicateWithMediator=Si prega di comunicare nella schermata \"Supporto\" con il mediatore. -portfolio.pending.disputeOpenedMyUser=Hai già aperto una disputa.\n{0} +portfolio.pending.disputeOpenedByUser=Hai già aperto una disputa.\n{0} portfolio.pending.disputeOpenedByPeer=Il tuo pari commerciale ha aperto una controversia\n{0} portfolio.pending.noReceiverAddressDefined=Nessun indirizzo del destinatario definito diff --git a/core/src/main/resources/i18n/displayStrings_ja.properties b/core/src/main/resources/i18n/displayStrings_ja.properties index db714966..569d9825 100644 --- a/core/src/main/resources/i18n/displayStrings_ja.properties +++ b/core/src/main/resources/i18n/displayStrings_ja.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=サポートチケットをオープン portfolio.pending.supportTicketOpened=サポートチケットがオープンされた portfolio.pending.communicateWithArbitrator=「サポート」画面で調停人と連絡を取ってください。 portfolio.pending.communicateWithMediator=\"サポート\" 画面で調停者と連絡を取ってください。 -portfolio.pending.disputeOpenedMyUser=あなたは既に係争を開始しています\n{0} +portfolio.pending.disputeOpenedByUser=あなたは既に係争を開始しています\n{0} portfolio.pending.disputeOpenedByPeer=あなたのトレード相手は係争を開始しました\n{0} portfolio.pending.noReceiverAddressDefined=受信者のアドレスが定義されていません diff --git a/core/src/main/resources/i18n/displayStrings_pt-br.properties b/core/src/main/resources/i18n/displayStrings_pt-br.properties index eb8be63a..3316dd77 100644 --- a/core/src/main/resources/i18n/displayStrings_pt-br.properties +++ b/core/src/main/resources/i18n/displayStrings_pt-br.properties @@ -777,7 +777,7 @@ portfolio.pending.openSupport=Abrir ticket de suporte portfolio.pending.supportTicketOpened=Ticket de suporte aberto portfolio.pending.communicateWithArbitrator=Por favor, vá até a seção \"Suporte\" e entre em contato com o árbitro. portfolio.pending.communicateWithMediator=Por favor, entre em contato com o mediador na seção \"Suporte\". -portfolio.pending.disputeOpenedMyUser=Você já abriu uma disputa.\n{0} +portfolio.pending.disputeOpenedByUser=Você já abriu uma disputa.\n{0} portfolio.pending.disputeOpenedByPeer=Seu parceiro de negociação abriu uma disputa\n{0} portfolio.pending.noReceiverAddressDefined=Nenhum endereço de recebimento definido diff --git a/core/src/main/resources/i18n/displayStrings_pt.properties b/core/src/main/resources/i18n/displayStrings_pt.properties index eb746b1f..a211926b 100644 --- a/core/src/main/resources/i18n/displayStrings_pt.properties +++ b/core/src/main/resources/i18n/displayStrings_pt.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Abrir bilhete de apoio portfolio.pending.supportTicketOpened=Bilhete de apoio aberto portfolio.pending.communicateWithArbitrator=Por favor comunique no ecrã \"Apoio\" com o árbitro. portfolio.pending.communicateWithMediator=Por favor comunique com o mediador no ecrã \"Apoio\". -portfolio.pending.disputeOpenedMyUser=Você já abriu uma disputa.\n{0} +portfolio.pending.disputeOpenedByUser=Você já abriu uma disputa.\n{0} portfolio.pending.disputeOpenedByPeer=O seu par de negociação abriu uma disputa\n{0} portfolio.pending.noReceiverAddressDefined=Nenhum endereço de recipiente definido diff --git a/core/src/main/resources/i18n/displayStrings_ru.properties b/core/src/main/resources/i18n/displayStrings_ru.properties index adc63c03..40f2eac9 100644 --- a/core/src/main/resources/i18n/displayStrings_ru.properties +++ b/core/src/main/resources/i18n/displayStrings_ru.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Обратиться за поддержкой portfolio.pending.supportTicketOpened=Запрос на поддержку отправлен portfolio.pending.communicateWithArbitrator=Свяжитесь с арбитром в разделе \«Поддержка\». portfolio.pending.communicateWithMediator=Please communicate in the \"Support\" screen with the mediator. -portfolio.pending.disputeOpenedMyUser=Вы уже начали спор.\n{0} +portfolio.pending.disputeOpenedByUser=Вы уже начали спор.\n{0} portfolio.pending.disputeOpenedByPeer=Ваш контрагент начал спор\n{0} portfolio.pending.noReceiverAddressDefined=Адрес получателя не установлен diff --git a/core/src/main/resources/i18n/displayStrings_th.properties b/core/src/main/resources/i18n/displayStrings_th.properties index 2ff544a5..a1ea7206 100644 --- a/core/src/main/resources/i18n/displayStrings_th.properties +++ b/core/src/main/resources/i18n/displayStrings_th.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=เปิดปุ่มช่วยเหลื portfolio.pending.supportTicketOpened=ปุ่มช่วยเหลือถูกเปิดแล้ว portfolio.pending.communicateWithArbitrator=กรุณาติดต่อโดยไปที่ \"ช่วยเหลือและสนับสนุน \" กับผู้ไกล่เกลี่ย portfolio.pending.communicateWithMediator=Please communicate in the \"Support\" screen with the mediator. -portfolio.pending.disputeOpenedMyUser=คุณได้เปิดข้อพิพาทแล้ว\n{0} +portfolio.pending.disputeOpenedByUser=คุณได้เปิดข้อพิพาทแล้ว\n{0} portfolio.pending.disputeOpenedByPeer=ผู้ร่วมการค้าของคุณได้เปิดประเด็นการอภิปรายขึ้น\n{0} portfolio.pending.noReceiverAddressDefined=ไม่ได้ระบุที่อยู่ผู้รับ diff --git a/core/src/main/resources/i18n/displayStrings_vi.properties b/core/src/main/resources/i18n/displayStrings_vi.properties index b7ed1219..483f9917 100644 --- a/core/src/main/resources/i18n/displayStrings_vi.properties +++ b/core/src/main/resources/i18n/displayStrings_vi.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=Mở đơn hỗ trợ portfolio.pending.supportTicketOpened=Đơn hỗ trợ đã mở portfolio.pending.communicateWithArbitrator=Vui lòng liên lạc với trong tài qua màn hình \"Hỗ trợ\". portfolio.pending.communicateWithMediator=Please communicate in the \"Support\" screen with the mediator. -portfolio.pending.disputeOpenedMyUser=Bạn đã mở một khiếu nại.\n{0} +portfolio.pending.disputeOpenedByUser=Bạn đã mở một khiếu nại.\n{0} portfolio.pending.disputeOpenedByPeer=Đối tác giao dịch của bạn đã mở một khiếu nại\n{0} portfolio.pending.noReceiverAddressDefined=Không có địa chỉ người nhận diff --git a/core/src/main/resources/i18n/displayStrings_zh-hans.properties b/core/src/main/resources/i18n/displayStrings_zh-hans.properties index a3651b6b..fb35b67e 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hans.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hans.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=创建帮助话题 portfolio.pending.supportTicketOpened=帮助话题已经创建 portfolio.pending.communicateWithArbitrator=请在“帮助”界面上与仲裁员联系。 portfolio.pending.communicateWithMediator=请在“支持”页面中与调解员进行联系。 -portfolio.pending.disputeOpenedMyUser=您创建了一个纠纷。\n{0} +portfolio.pending.disputeOpenedByUser=您创建了一个纠纷。\n{0} portfolio.pending.disputeOpenedByPeer=您的交易对象创建了一个纠纷。\n{0} portfolio.pending.noReceiverAddressDefined=没有定义接收地址 diff --git a/core/src/main/resources/i18n/displayStrings_zh-hant.properties b/core/src/main/resources/i18n/displayStrings_zh-hant.properties index 93e79155..1ed57722 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hant.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hant.properties @@ -774,7 +774,7 @@ portfolio.pending.openSupport=創建幫助話題 portfolio.pending.supportTicketOpened=幫助話題已經創建 portfolio.pending.communicateWithArbitrator=請在“幫助”界面上與仲裁員聯繫。 portfolio.pending.communicateWithMediator=請在“支持”頁面中與調解員進行聯繫。 -portfolio.pending.disputeOpenedMyUser=您創建了一個糾紛。\n{0} +portfolio.pending.disputeOpenedByUser=您創建了一個糾紛。\n{0} portfolio.pending.disputeOpenedByPeer=您的交易對象創建了一個糾紛。\n{0} portfolio.pending.noReceiverAddressDefined=沒有定義接收地址 diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java index c2fcf789..708d0498 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java @@ -114,20 +114,20 @@ public class TradeStepInfo { button.getStyleClass().remove("action-button"); button.setDisable(false); break; - case IN_MEDIATION_SELF_REQUESTED: + case IN_ARBITRATION_SELF_REQUESTED: // red button - titledGroupBg.setText(Res.get("portfolio.pending.mediationRequested")); - label.updateContent(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithMediator"))); - button.setText(Res.get("portfolio.pending.mediationRequested").toUpperCase()); + titledGroupBg.setText(Res.get("portfolio.pending.arbitrationRequested")); + label.updateContent(Res.get("portfolio.pending.disputeOpenedByUser", Res.get("portfolio.pending.communicateWithArbitrator"))); + button.setText(Res.get("portfolio.pending.arbitrationRequested").toUpperCase()); button.setId("open-dispute-button"); button.getStyleClass().remove("action-button"); button.setDisable(true); break; - case IN_MEDIATION_PEER_REQUESTED: + case IN_ARBITRATION_PEER_REQUESTED: // red button - titledGroupBg.setText(Res.get("portfolio.pending.mediationRequested")); - label.updateContent(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithMediator"))); - button.setText(Res.get("portfolio.pending.mediationRequested").toUpperCase()); + titledGroupBg.setText(Res.get("portfolio.pending.arbitrationRequested")); + label.updateContent(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithArbitrator"))); + button.setText(Res.get("portfolio.pending.arbitrationRequested").toUpperCase()); button.setId("open-dispute-button"); button.getStyleClass().remove("action-button"); button.setDisable(true); @@ -162,7 +162,7 @@ public class TradeStepInfo { case IN_REFUND_REQUEST_SELF_REQUESTED: // red button titledGroupBg.setText(Res.get("portfolio.pending.refundRequested")); - label.updateContent(Res.get("portfolio.pending.disputeOpenedMyUser", Res.get("portfolio.pending.communicateWithArbitrator"))); + label.updateContent(Res.get("portfolio.pending.disputeOpenedByUser", Res.get("portfolio.pending.communicateWithArbitrator"))); button.setText(Res.get("portfolio.pending.refundRequested").toUpperCase()); button.setId("open-dispute-button"); button.getStyleClass().remove("action-button");