Browse Source

add txid to transactions csv download

terminal
Craig Raw 3 years ago
parent
commit
35b57f9d69
  1. 4
      src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java
  2. 3
      src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java

4
src/main/java/com/sparrowwallet/sparrow/control/MixStatusCell.java

@ -66,7 +66,9 @@ public class MixStatusCell extends TreeTableCell<Entry, UtxoEntry.MixStatus> {
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);

3
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();

Loading…
Cancel
Save