From 32d25286a6a42249ef2260776c51faac77ee04ed Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 6 Aug 2020 10:27:03 +0200 Subject: [PATCH] store passphrase in memory as securestring --- src/main/java/com/sparrowwallet/sparrow/io/Electrum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java b/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java index f37189b8..c3fff6c8 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/Electrum.java @@ -218,7 +218,7 @@ public class Electrum implements KeystoreFileImport, WalletImport, WalletExport ek.pw_hash_version = 1; if(keystore.getSeed().getType() == DeterministicSeed.Type.ELECTRUM) { ek.seed = keystore.getSeed().getMnemonicString().asString(); - ek.passphrase = keystore.getSeed().getPassphrase(); + ek.passphrase = keystore.getSeed().getPassphrase() == null ? null : keystore.getSeed().getPassphrase().asString(); } else if(keystore.getSeed().getType() == DeterministicSeed.Type.BIP39) { ew.seed_type = "bip39"; }