mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 01:49:27 -05:00
electrum-words: fix seed mistakenly thought to be old style
It'd see "empty" words due to extraneous spaces
This commit is contained in:
parent
ae8841f2ab
commit
bb708ab8c3
@ -422,10 +422,11 @@ namespace crypto
|
|||||||
* \param seed The seed to check (a space delimited concatenated word list)
|
* \param seed The seed to check (a space delimited concatenated word list)
|
||||||
* \return true if the seed passed is a old style seed false if not.
|
* \return true if the seed passed is a old style seed false if not.
|
||||||
*/
|
*/
|
||||||
bool get_is_old_style_seed(const std::string &seed)
|
bool get_is_old_style_seed(std::string seed)
|
||||||
{
|
{
|
||||||
std::vector<std::string> word_list;
|
std::vector<std::string> word_list;
|
||||||
boost::split(word_list, seed, boost::is_any_of(" "));
|
boost::algorithm::trim(seed);
|
||||||
|
boost::split(word_list, seed, boost::is_any_of(" "), boost::token_compress_on);
|
||||||
return word_list.size() != (seed_length + 1);
|
return word_list.size() != (seed_length + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ namespace crypto
|
|||||||
* \param seed The seed to check (a space delimited concatenated word list)
|
* \param seed The seed to check (a space delimited concatenated word list)
|
||||||
* \return true if the seed passed is a old style seed false if not.
|
* \return true if the seed passed is a old style seed false if not.
|
||||||
*/
|
*/
|
||||||
bool get_is_old_style_seed(const std::string &seed);
|
bool get_is_old_style_seed(std::string seed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user