From f1a662ba8a39963d6b04b07fbb991f2bea23f024 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 8 Aug 2022 13:46:37 +0200 Subject: [PATCH] fix name length on coldcard multisig export and update help text --- .../java/com/sparrowwallet/sparrow/io/ColdcardMultisig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/ColdcardMultisig.java b/src/main/java/com/sparrowwallet/sparrow/io/ColdcardMultisig.java index 2d7fa482..ea5f8a4b 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/ColdcardMultisig.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/ColdcardMultisig.java @@ -187,7 +187,7 @@ public class ColdcardMultisig implements WalletImport, KeystoreFileImport, Walle BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8)); writer.append("# " + getName() + " setup file (created by Sparrow)\n"); writer.append("#\n"); - writer.append("Name: ").append(wallet.getFullName()).append("\n"); + writer.append("Name: ").append(wallet.getFullName().length() >= 20 ? (wallet.getDisplayName().length() >= 20 ? wallet.getDisplayName().substring(0, 20) : wallet.getDisplayName()) : wallet.getFullName()).append("\n"); writer.append("Policy: ").append(Integer.toString(wallet.getDefaultPolicy().getNumSignaturesRequired())).append(" of ").append(Integer.toString(wallet.getKeystores().size())).append("\n"); if(!multipleDerivations) { writer.append("Derivation: ").append(wallet.getKeystores().get(0).getKeyDerivation().getDerivationPath()).append("\n"); @@ -214,7 +214,7 @@ public class ColdcardMultisig implements WalletImport, KeystoreFileImport, Walle @Override public String getWalletExportDescription() { - return "Export file that can be read by your Coldcard using the Settings > Multisig Wallets > Import from SD feature."; + return "Export file that can be read by your Coldcard using the Settings > Multisig Wallets > Import from File feature."; } @Override