From 57b3fd99bca9d7569f75ebef7748cf99a2a7db92 Mon Sep 17 00:00:00 2001 From: Jimbo Date: Mon, 5 Apr 2021 07:00:04 -0400 Subject: [PATCH] Correcting address column in exported CSV, removing Derivation column. --- .../sparrow/wallet/AddressesController.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java index 5ab5f51d..65dd950f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/AddressesController.java @@ -105,20 +105,17 @@ public class AddressesController extends WalletFormController implements Initial FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Export Addresses File"); String extension = "txt"; - fileChooser.setInitialFileName(getWalletForm().getWallet().getName() + "-" + - "addresses" + - (extension == null || extension.isEmpty() ? "" : "." + extension)); + fileChooser.setInitialFileName(getWalletForm().getWallet().getName() + "-addresses.txt"); File file = fileChooser.showSaveDialog(window); if(file != null) { try(FileOutputStream outputStream = new FileOutputStream(file)) { CsvWriter writer = new CsvWriter(outputStream, ',', StandardCharsets.UTF_8); - writer.writeRecord(new String[] {"Index", "Payment Address", "Derivation"}); + writer.writeRecord(new String[] {"Index", "Payment Address"}); for(Entry entry : getWalletForm().getNodeEntry(KeyPurpose.RECEIVE).getChildren()) { NodeEntry childEntry = (NodeEntry)entry; writer.write(childEntry.getNode().getIndex() + ""); - writer.write(childEntry.getNode().toString()); - writer.write(childEntry.getNode().getDerivationPath()); + writer.write(childEntry.getAddress().toString()); writer.endRecord(); } writer.close();