We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c802f29 commit f549490Copy full SHA for f549490
crates/wallets/src/utils.rs
@@ -42,10 +42,11 @@ pub fn create_mnemonic_signer(
42
index: u32,
43
) -> Result<WalletSigner> {
44
let mnemonic = if Path::new(mnemonic).is_file() {
45
- fs::read_to_string(mnemonic)?.replace('\n', "")
+ fs::read_to_string(mnemonic)?
46
} else {
47
mnemonic.to_owned()
48
};
49
+ let mnemonic = mnemonic.split_whitespace().collect::<Vec<_>>().join(" ");
50
51
Ok(WalletSigner::from_mnemonic(&mnemonic, passphrase, hd_path, index)?)
52
}
0 commit comments