fix dispute and trader chat button and states

ui can open dispute after payment sent
ui indicates if dispute opened by self or peer
This commit is contained in:
woodser 2022-12-20 13:57:57 +00:00
parent f13e1ec610
commit e4046bd84e
18 changed files with 30 additions and 28 deletions

View File

@ -565,8 +565,8 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> 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<T extends DisputeList<Dispute>> 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(),

View File

@ -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();
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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=آدرسی برای گیرنده تعیین نشده است

View File

@ -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

View File

@ -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

View File

@ -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=受信者のアドレスが定義されていません

View File

@ -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

View File

@ -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

View File

@ -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=Адрес получателя не установлен

View File

@ -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=ไม่ได้ระบุที่อยู่ผู้รับ

View File

@ -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

View File

@ -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=没有定义接收地址

View File

@ -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=沒有定義接收地址

View File

@ -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");