From 654f526918446aac31e9653447785c0da47bc4dc Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Mon, 21 Oct 2019 13:20:54 -0700 Subject: [PATCH] Check for wallet encryption first. --- lib/src/lightwallet/bugs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/lightwallet/bugs.rs b/lib/src/lightwallet/bugs.rs index ed4295b..0e9c925 100644 --- a/lib/src/lightwallet/bugs.rs +++ b/lib/src/lightwallet/bugs.rs @@ -28,6 +28,10 @@ impl BugBip39Derivation { return false; } + if wallet.is_encrypted() { + return false; + } + // The seed bytes is the raw entropy. To pass it to HD wallet generation, // we need to get the 64 byte bip39 entropy let bip39_seed = bip39::Seed::new(&Mnemonic::from_entropy(&wallet.seed, Language::English).unwrap(), "");