Skip to content

Commit 1506af7

Browse files
committed
format message on error connecting to monero network
1 parent 4f5f3a5 commit 1506af7

16 files changed

+24
-1
lines changed

core/src/main/java/haveno/core/api/XmrConnectionService.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import haveno.common.app.DevEnv;
2525
import haveno.common.config.BaseCurrencyNetwork;
2626
import haveno.common.config.Config;
27+
import haveno.core.locale.Res;
2728
import haveno.core.trade.HavenoUtils;
2829
import haveno.core.user.Preferences;
2930
import haveno.core.xmr.model.EncryptedConnectionList;
@@ -915,8 +916,15 @@ else if (lastInfo.isBusySyncing()) {
915916
// skip if shut down
916917
if (isShutDownStarted) return;
917918

919+
// format error message
920+
String errorMsg = e.getMessage();
921+
if (errorMsg != null && errorMsg.contains(": ")) {
922+
errorMsg = errorMsg.substring(errorMsg.indexOf(": ") + 2); // strip exception class
923+
}
924+
errorMsg = Res.get("popup.warning.moneroConnection", errorMsg);
925+
918926
// set error message
919-
getConnectionServiceErrorMsg().set(e.getMessage());
927+
getConnectionServiceErrorMsg().set(errorMsg);
920928
} finally {
921929
pollInProgress = false;
922930
}

core/src/main/resources/i18n/displayStrings.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,6 +2194,7 @@ popup.warning.lockedUpFunds=You have locked up funds from a failed trade.\n\
21942194
Deposit tx address: {1}\n\
21952195
Trade ID: {2}.\n\n\
21962196
Please open a support ticket by selecting the trade in the open trades screen and pressing \"alt + o\" or \"option + o\"."
2197+
popup.warning.moneroConnection=There was a problem connecting to the Monero network.\n\n{0}
21972198

21982199
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
21992200
takeOffer.cancelButton=Cancel take-offer

core/src/main/resources/i18n/displayStrings_cs.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,7 @@ popup.warning.lockedUpFunds=Zamkli jste finanční prostředky z neúspěšného
21452145
Adresa vkladové tx: {1}\n\
21462146
ID obchodu: {2}.\n\n\
21472147
Otevřete prosím úkol pro podporu výběrem obchodu na obrazovce otevřených obchodů a stisknutím \"alt + o\" nebo \"option + o\"."
2148+
popup.warning.moneroConnection=Došlo k problému s připojením k síti Monero.\n\n{0}
21482149

21492150
popup.warning.makerTxInvalid=Tato nabídka není platná. Prosím vyberte jinou nabídku.\n\n
21502151
takeOffer.cancelButton=Zrušit akceptaci nabídky

core/src/main/resources/i18n/displayStrings_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,7 @@ popup.warning.noPriceFeedAvailable=Es ist kein Marktpreis für diese Währung ve
16241624
popup.warning.sendMsgFailed=Das Senden der Nachricht an Ihren Handelspartner ist fehlgeschlagen.\nVersuchen Sie es bitte erneut und falls es weiter fehlschlägt, erstellen Sie bitte einen Fehlerbericht.
16251625
popup.warning.messageTooLong=Ihre Nachricht überschreitet die maximal erlaubte Größe. Sende Sie diese in mehreren Teilen oder laden Sie sie in einen Dienst wie https://pastebin.com hoch.
16261626
popup.warning.lockedUpFunds=Sie haben gesperrtes Guthaben aus einem gescheiterten Trade.\nGesperrtes Guthaben: {0} \nEinzahlungs-Tx-Adresse: {1}\nTrade ID: {2}.\n\nBitte öffnen Sie ein Support-Ticket, indem Sie den Trade im Bildschirm "Offene Trades" auswählen und auf \"alt + o\" oder \"option + o\" drücken.
1627+
popup.warning.moneroConnection=Es gab ein Problem bei der Verbindung zum Monero-Netzwerk.\n\n{0}
16271628

16281629
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
16291630
takeOffer.cancelButton=Cancel take-offer

core/src/main/resources/i18n/displayStrings_es.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ popup.warning.noPriceFeedAvailable=No hay una fuente de precios disponible para
16251625
popup.warning.sendMsgFailed=El envío de mensaje a su compañero de intercambio falló.\nPor favor, pruebe de nuevo y si continúa fallando, reporte el fallo.
16261626
popup.warning.messageTooLong=Su mensaje excede el tamaño máximo permitido. Por favor, envíelo por partes o súbalo a un servicio como https://pastebin.com
16271627
popup.warning.lockedUpFunds=Ha bloqueado fondos de un intercambio fallido.\nBalance bloqueado: {0}\nDirección de depósito TX: {1}\nID de intercambio: {2}.\n\nPor favor, abra un ticket de soporte seleccionando el intercambio en la pantalla de intercambios pendientes y haciendo clic en \"alt + o\" o \"option + o\"."
1628+
popup.warning.moneroConnection=Hubo un problema al conectar con la red de Monero.\n\n{0}
16281629

16291630
popup.warning.makerTxInvalid=Esta oferta no es válida. Por favor seleccione otra oferta diferente.\n\n
16301631
takeOffer.cancelButton=Cancelar toma de oferta

core/src/main/resources/i18n/displayStrings_fa.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,7 @@ popup.warning.noPriceFeedAvailable=برای این ارز هیچ خوراک قی
16201620
popup.warning.sendMsgFailed=ارسال پیام به شریک معاملاتی شما ناموفق بود. \nلطفا دوباره امتحان کنید و اگر همچنان ناموفق بود، گزارش یک اشکال را ارسال کنید.
16211621
popup.warning.messageTooLong=پیام شما بیش از حداکثر اندازه مجاز است. لطفا آن را در چند بخش ارسال کنید یا آن را در یک سرویس مانند https://pastebin.com آپلود کنید.
16221622
popup.warning.lockedUpFunds=You have locked up funds from a failed trade.\nLocked up balance: {0} \nDeposit tx address: {1}\nTrade ID: {2}.\n\nPlease open a support ticket by selecting the trade in the open trades screen and pressing \"alt + o\" or \"option + o\"."
1623+
popup.warning.moneroConnection=مشکلی در اتصال به شبکه مونرو رخ داده است.\n\n{0}
16231624

16241625
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
16251626
takeOffer.cancelButton=Cancel take-offer

core/src/main/resources/i18n/displayStrings_fr.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ popup.warning.noPriceFeedAvailable=Il n'y a pas de flux pour le prix de disponib
16261626
popup.warning.sendMsgFailed=L'envoi du message à votre partenaire d'échange a échoué.\nMerci d'essayer de nouveau et si l'échec persiste merci de reporter le bug.
16271627
popup.warning.messageTooLong=Votre message dépasse la taille maximale autorisée. Veuillez l'envoyer en plusieurs parties ou le télécharger depuis un service comme https://pastebin.com.
16281628
popup.warning.lockedUpFunds=Vous avez des fonds bloqués d'une transaction qui a échoué.\nSolde bloqué: {0}\nAdresse de la tx de dépôt: {1}\nID de l'échange: {2}.\n\nVeuillez ouvrir un ticket de support en sélectionnant la transaction dans l'écran des transactions ouvertes et en appuyant sur \"alt + o\" ou \"option + o\".
1629+
popup.warning.moneroConnection=Il y a eu un problème de connexion au réseau Monero.\n\n{0}
16291630

16301631
popup.warning.makerTxInvalid=Cette offre n'est pas valide. Veuillez choisir une autre offre.\n\n
16311632
takeOffer.cancelButton=Annuler la prise de l'offre

core/src/main/resources/i18n/displayStrings_it.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,6 +1623,7 @@ popup.warning.noPriceFeedAvailable=Non è disponibile alcun feed di prezzi per l
16231623
popup.warning.sendMsgFailed=Invio del messaggio al tuo partner commerciale non riuscito.\nTi preghiamo di riprovare e se continua a fallire segnalare un bug.
16241624
popup.warning.messageTooLong=Il tuo messaggio supera la dimensione massima consentita. Si prega di inviarlo in più parti o caricarlo su un servizio come https://pastebin.com.
16251625
popup.warning.lockedUpFunds=Hai bloccato i fondi da uno scambio fallito.\nSaldo bloccato: {0}\nIndirizzo tx deposito: {1}\nID scambio: {2}.\n\nApri un ticket di supporto selezionando lo scambio nella schermata degli scambi aperti e premendo \"alt + o\" o \"option + o\"."
1626+
popup.warning.moneroConnection=Si è verificato un problema durante la connessione alla rete Monero.\n\n{0}
16261627

16271628
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
16281629
takeOffer.cancelButton=Cancel take-offer

core/src/main/resources/i18n/displayStrings_ja.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,7 @@ popup.warning.noPriceFeedAvailable=その通貨で利用できる価格フィー
16241624
popup.warning.sendMsgFailed=トレード相手へのメッセージの送信に失敗しました。\nもう一度試してください。失敗し続ける場合はバグを報告してください。
16251625
popup.warning.messageTooLong=メッセージが許容サイズ上限を超えています。いくつかに分けて送信するか、 https://pastebin.com のようなサービスにアップロードしてください。
16261626
popup.warning.lockedUpFunds=失敗したトレードから残高をロックしました。\nロックされた残高: {0} \nデポジットtxアドレス: {1} \nトレードID: {2}。\n\nオープントレード画面でこのトレードを選択し、「alt + o」または「option + o」を押してサポートチケットを開いてください。
1627+
popup.warning.moneroConnection=Moneroネットワークへの接続中に問題が発生しました。\n\n{0}
16271628

16281629
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
16291630
takeOffer.cancelButton=Cancel take-offer

core/src/main/resources/i18n/displayStrings_pt-br.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,7 @@ popup.warning.btcChangeBelowDustException=Esta transação cria um troco menor d
16301630

16311631
popup.warning.messageTooLong=Sua mensagem excede o tamanho máximo permitido. Favor enviá-la em várias partes ou utilizando um serviço como https://pastebin.com.
16321632
popup.warning.lockedUpFunds=Você possui fundos travados em uma negociação com erro.\nSaldo travado: {0}\nEndereço da transação de depósito: {1}\nID da negociação: {2}.\n\nPor favor, abra um ticket de suporte selecionando a negociação na tela de negociações em aberto e depois pressionando "\alt+o\" ou \"option+o\".
1633+
popup.warning.moneroConnection=Houve um problema ao conectar-se à rede Monero.\n\n{0}
16331634

16341635
popup.warning.makerTxInvalid=This offer is not valid. Please choose a different offer.\n\n
16351636
takeOffer.cancelButton=Cancel take-offer

0 commit comments

Comments
 (0)