diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java b/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java index 618197a0..bd18c0e0 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java @@ -173,6 +173,10 @@ public class Electrum implements KeystoreFileImport, WalletImport, WalletExport keystore.setKeyDerivation(new KeyDerivation(masterFingerprint, derivationPath)); keystore.setExtendedPublicKey(xPub); keystore.setLabel(ek.label != null ? ek.label : "Electrum"); + if(keystore.getLabel().length() > Keystore.MAX_LABEL_LENGTH) { + keystore.setLabel(keystore.getLabel().substring(0, Keystore.MAX_LABEL_LENGTH)); + } + wallet.getKeystores().add(keystore); ExtendedKey.Header xpubHeader = ExtendedKey.Header.fromExtendedKey(ek.xpub);