diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 3cf0656f..52b270fc 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -1972,7 +1972,7 @@ tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent XMR. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_cs.properties b/core/src/main/resources/i18n/displayStrings_cs.properties index 8d37cd34..05c58ac8 100644 --- a/core/src/main/resources/i18n/displayStrings_cs.properties +++ b/core/src/main/resources/i18n/displayStrings_cs.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Rozhodce/Mediátor tradeDetailsWindow.detailData=Detailní data txDetailsWindow.headline=Detaily transakce -txDetailsWindow.btc.note=Poslali jste BTC. +txDetailsWindow.xmr.note=Poslali jste BTC. txDetailsWindow.sentTo=Odesláno na txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_de.properties b/core/src/main/resources/i18n/displayStrings_de.properties index c210eed7..fe4741f8 100644 --- a/core/src/main/resources/i18n/displayStrings_de.properties +++ b/core/src/main/resources/i18n/displayStrings_de.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Vermittler/Mediator tradeDetailsWindow.detailData=Detaillierte Daten txDetailsWindow.headline=Transaktionsdetails -txDetailsWindow.btc.note=Sie haben BTC gesendet. +txDetailsWindow.xmr.note=Sie haben BTC gesendet. txDetailsWindow.sentTo=Gesendet an txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_es.properties b/core/src/main/resources/i18n/displayStrings_es.properties index d28c108c..2af0060a 100644 --- a/core/src/main/resources/i18n/displayStrings_es.properties +++ b/core/src/main/resources/i18n/displayStrings_es.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detalle de datos txDetailsWindow.headline=Detalles de transacción -txDetailsWindow.btc.note=Ha enviado BTC +txDetailsWindow.xmr.note=Ha enviado BTC txDetailsWindow.sentTo=Enviado a txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_fa.properties b/core/src/main/resources/i18n/displayStrings_fa.properties index 85e32040..8e70e9bd 100644 --- a/core/src/main/resources/i18n/displayStrings_fa.properties +++ b/core/src/main/resources/i18n/displayStrings_fa.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_fr.properties b/core/src/main/resources/i18n/displayStrings_fr.properties index 6f275e3b..e3f9e9de 100644 --- a/core/src/main/resources/i18n/displayStrings_fr.properties +++ b/core/src/main/resources/i18n/displayStrings_fr.properties @@ -1502,7 +1502,7 @@ tradeDetailsWindow.agentAddresses=Arbitre/Médiateur tradeDetailsWindow.detailData=Données détaillées txDetailsWindow.headline=Détails de la transaction -txDetailsWindow.btc.note=Vous avez envoyé du BTC. +txDetailsWindow.xmr.note=Vous avez envoyé du BTC. txDetailsWindow.sentTo=Envoyé à txDetailsWindow.txId=ID de transaction diff --git a/core/src/main/resources/i18n/displayStrings_it.properties b/core/src/main/resources/i18n/displayStrings_it.properties index 813269dd..4c7f48d8 100644 --- a/core/src/main/resources/i18n/displayStrings_it.properties +++ b/core/src/main/resources/i18n/displayStrings_it.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Arbitro/Mediatore tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_ja.properties b/core/src/main/resources/i18n/displayStrings_ja.properties index 569d9825..2720f5e9 100644 --- a/core/src/main/resources/i18n/displayStrings_ja.properties +++ b/core/src/main/resources/i18n/displayStrings_ja.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=仲裁者 / 調停人 tradeDetailsWindow.detailData=詳細データ txDetailsWindow.headline=トランザクション詳細 -txDetailsWindow.btc.note=BTCを送金しました。 +txDetailsWindow.xmr.note=BTCを送金しました。 txDetailsWindow.sentTo=送信先 txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_pt-br.properties b/core/src/main/resources/i18n/displayStrings_pt-br.properties index 3316dd77..fb0a03b4 100644 --- a/core/src/main/resources/i18n/displayStrings_pt-br.properties +++ b/core/src/main/resources/i18n/displayStrings_pt-br.properties @@ -1506,7 +1506,7 @@ tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_pt.properties b/core/src/main/resources/i18n/displayStrings_pt.properties index a211926b..0b55e62f 100644 --- a/core/src/main/resources/i18n/displayStrings_pt.properties +++ b/core/src/main/resources/i18n/displayStrings_pt.properties @@ -1499,7 +1499,7 @@ tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_ru.properties b/core/src/main/resources/i18n/displayStrings_ru.properties index 40f2eac9..53cc9b00 100644 --- a/core/src/main/resources/i18n/displayStrings_ru.properties +++ b/core/src/main/resources/i18n/displayStrings_ru.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_th.properties b/core/src/main/resources/i18n/displayStrings_th.properties index a1ea7206..c7eb251c 100644 --- a/core/src/main/resources/i18n/displayStrings_th.properties +++ b/core/src/main/resources/i18n/displayStrings_th.properties @@ -1501,7 +1501,7 @@ tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_vi.properties b/core/src/main/resources/i18n/displayStrings_vi.properties index 483f9917..c5e9e146 100644 --- a/core/src/main/resources/i18n/displayStrings_vi.properties +++ b/core/src/main/resources/i18n/displayStrings_vi.properties @@ -1503,7 +1503,7 @@ tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_zh-hans.properties b/core/src/main/resources/i18n/displayStrings_zh-hans.properties index fb35b67e..481bf196 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hans.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hans.properties @@ -1502,7 +1502,7 @@ tradeDetailsWindow.agentAddresses=仲裁员/调解员 tradeDetailsWindow.detailData=详情数据 txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/core/src/main/resources/i18n/displayStrings_zh-hant.properties b/core/src/main/resources/i18n/displayStrings_zh-hant.properties index 1ed57722..e723b14b 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hant.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hant.properties @@ -1502,7 +1502,7 @@ tradeDetailsWindow.agentAddresses=仲裁員/調解員 tradeDetailsWindow.detailData=Detail data txDetailsWindow.headline=Transaction Details -txDetailsWindow.btc.note=You have sent BTC. +txDetailsWindow.xmr.note=You have sent BTC. txDetailsWindow.sentTo=Sent to txDetailsWindow.txId=TxId diff --git a/desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java b/desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java index 54f305f4..09e82ba9 100644 --- a/desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java +++ b/desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java @@ -109,6 +109,9 @@ public class WithdrawalView extends ActivatableView { final TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, rowIndex, 4, Res.get("funds.deposit.withdrawFromWallet")); titledGroupBg.getStyleClass().add("last"); + withdrawToTextField = addTopLabelInputTextField(gridPane, ++rowIndex, + Res.get("funds.withdrawal.toLabel", Res.getBaseCurrencyCode())).second; + final Tuple2 amountTuple3 = addTopLabelInputTextField(gridPane, ++rowIndex, Res.get("funds.withdrawal.receiverAmount", Res.getBaseCurrencyCode()), Layout.COMPACT_FIRST_ROW_DISTANCE); @@ -117,9 +120,6 @@ public class WithdrawalView extends ActivatableView { amountTextField = amountTuple3.second; amountTextField.setMinWidth(180); - withdrawToTextField = addTopLabelInputTextField(gridPane, ++rowIndex, - Res.get("funds.withdrawal.toLabel", Res.getBaseCurrencyCode())).second; - withdrawMemoTextField = addTopLabelInputTextField(gridPane, ++rowIndex, Res.get("funds.withdrawal.memoLabel", Res.getBaseCurrencyCode())).second; @@ -191,12 +191,11 @@ public class WithdrawalView extends ActivatableView { MoneroTxWallet tx = xmrWalletService.getWallet().createTx(new MoneroTxConfig() .setAccountIndex(0) .setAmount(HavenoUtils.coinToAtomicUnits(receiverAmount)) // TODO: rename to centinerosToAtomicUnits()? - .setAddress(withdrawToAddress) - .setNote(withdrawMemoTextField.getText())); + .setAddress(withdrawToAddress)); // create confirmation message + Coin sendersAmount = receiverAmount; Coin fee = HavenoUtils.atomicUnitsToCoin(tx.getFee()); - Coin sendersAmount = receiverAmount.add(fee); String messageText = Res.get("shared.sendFundsDetailsWithFee", formatter.formatCoinWithCode(sendersAmount), withdrawToAddress, @@ -212,9 +211,10 @@ public class WithdrawalView extends ActivatableView { // relay tx try { xmrWalletService.getWallet().relayTx(tx); + xmrWalletService.getWallet().setTxNote(tx.getHash(), withdrawMemoTextField.getText()); // TODO (monero-java): tx note does not persist when tx created then relayed String key = "showTransactionSent"; if (DontShowAgainLookup.showAgain(key)) { - new TxDetails(tx.getHash(), withdrawToAddress, formatter.formatCoinWithCode(sendersAmount)) + new TxDetails(tx.getHash(), withdrawToAddress, formatter.formatCoinWithCode(sendersAmount), formatter.formatCoinWithCode(fee), xmrWalletService.getWallet().getTxNote(tx.getHash())) .dontShowAgainId(key) .show(); } diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/TxDetails.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/TxDetails.java index 484753bf..2f64c161 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/TxDetails.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/TxDetails.java @@ -29,15 +29,16 @@ import static bisq.desktop.util.FormBuilder.*; public class TxDetails extends Overlay { - protected String txId, address, amount, note; + protected String txId, address, amount, fee, memo; protected TxIdTextField txIdTextField; - public TxDetails(String txId, String address, String amount) { + public TxDetails(String txId, String address, String amount, String fee, String memo) { type = Type.Attention; this.txId = txId; this.address = address; this.amount = amount; - this.note = Res.get("txDetailsWindow.btc.note"); + this.fee = fee; + this.memo = memo; } public void show() { @@ -57,12 +58,14 @@ public class TxDetails extends Overlay { protected void addContent() { GridPane.setColumnSpan( - addMultilineLabel(gridPane, ++rowIndex, note, 0), 2); + addMultilineLabel(gridPane, ++rowIndex, Res.get("txDetailsWindow.xmr.note"), 0), 2); Region spacer = new Region(); spacer.setMinHeight(20); gridPane.add(spacer, 0, ++rowIndex); - addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.amount"), amount); addConfirmationLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("txDetailsWindow.sentTo"), address); + addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.amount"), amount); + addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.txFee"), fee); + if (memo != null && !"".equals(memo)) addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("funds.withdrawal.memoLabel"), memo); txIdTextField = addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("txDetailsWindow.txId"), txId).second; } }