mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 06:43:28 +01:00
Merge pull request #2931
04349492
wallet2: error out in get_seed if the language is invalid (moneromooo-monero)
This commit is contained in:
commit
409e9bb029
@ -715,7 +715,11 @@ bool wallet2::get_seed(std::string& electrum_words, const epee::wipeable_string
|
|||||||
crypto::secret_key key = get_account().get_keys().m_spend_secret_key;
|
crypto::secret_key key = get_account().get_keys().m_spend_secret_key;
|
||||||
if (!passphrase.empty())
|
if (!passphrase.empty())
|
||||||
key = cryptonote::encrypt_key(key, passphrase);
|
key = cryptonote::encrypt_key(key, passphrase);
|
||||||
crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language);
|
if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language))
|
||||||
|
{
|
||||||
|
std::cout << "Failed to create seed from key for language: " << seed_language << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user