Skip to content

Commit 174e905

Browse files
committed
fix(crypto): recover ability to generate mnemonics
1 parent d7c1173 commit 174e905

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crypto/src/mnemonic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl MnemonicGenerator {
174174
};
175175

176176
// We handle the entropy directly here to avoid tiny-bip39's reliance on outdated rand lib
177-
let entropy = &mut Vec::with_capacity(mnemonic_type.entropy_bits() / 8);
177+
let entropy = &mut vec![0u8; mnemonic_type.entropy_bits() / 8];
178178
rand::thread_rng().fill_bytes(entropy);
179179
let mnemonic = bip39::Mnemonic::from_entropy(entropy, lang).unwrap();
180180

0 commit comments

Comments
 (0)