From 35b57f9d69eb0063c135fe54f86d38e62fa8cb35 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 5 Oct 2021 10:55:20 +0200 Subject: [PATCH] add txid to transactions csv download --- .../java/com/sparrowwallet/sparrow/control/MixStatusCell.java | 4 +++- .../sparrowwallet/sparrow/wallet/TransactionsController.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java b/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java index b53a3e8f..d551e0e9 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java @@ -66,7 +66,9 @@ public class MixStatusCell extends TreeTableCell { if(mixFailReason != MixFailReason.CANCEL) { setGraphic(getFailGlyph()); Tooltip tt = new Tooltip(); - tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError) + "\nMake sure your internet connection is stable and the computer is configured to prevent sleeping."); + tt.setText(mixFailReason.getMessage() + (mixError == null ? "" : ": " + mixError) + + "\nMix failures are generally caused by peers disconnecting during a mix." + + "\nMake sure your internet connection is stable and the computer is configured to prevent sleeping."); setTooltip(tt); } else { setGraphic(null); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java index 7905ace8..e1028f87 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java @@ -132,13 +132,14 @@ public class TransactionsController extends WalletFormController implements Init if(file != null) { try(FileOutputStream outputStream = new FileOutputStream(file)) { CsvWriter writer = new CsvWriter(outputStream, ',', StandardCharsets.UTF_8); - writer.writeRecord(new String[] {"Date", "Label", "Value", "Balance"}); + writer.writeRecord(new String[] {"Date", "Label", "Value", "Balance", "Txid"}); for(Entry entry : walletTransactionsEntry.getChildren()) { TransactionEntry txEntry = (TransactionEntry)entry; writer.write(txEntry.getBlockTransaction().getDate() == null ? "Unconfirmed" : EntryCell.DATE_FORMAT.format(txEntry.getBlockTransaction().getDate())); writer.write(txEntry.getLabel()); writer.write(getCoinValue(txEntry.getValue())); writer.write(getCoinValue(txEntry.getBalance())); + writer.write(txEntry.getBlockTransaction().getHash().toString()); writer.endRecord(); } writer.close();