diff options
author | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 02:29:25 +0530 |
---|---|---|
committer | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 02:29:25 +0530 |
commit | 8f587ba1c8044ed6face883d8f50cd43e27484e3 (patch) | |
tree | 2b7afff874d80661be6abd0a971f7dcf5f347a29 /src/simplewallet/simplewallet.cpp | |
parent | Doxygen comments in (diff) | |
download | monero-8f587ba1c8044ed6face883d8f50cd43e27484e3.tar.xz |
CRC Checksum for word seed. Gives a new 25 word seed with checksum if one without checksum is passed. Doxygen comment fix.
Diffstat (limited to '')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 9d6f23e6b..ee2b1346f 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -511,15 +511,19 @@ bool simple_wallet::new_wallet(const string &wallet_file, const std::string& pas // convert rng value to electrum-style word list std::string electrum_words; - // Ask for language if it is not a wallet restore or if the old version of the wallet - // had given the user an old style word list. - if (!m_restore_deterministic_wallet || crypto::ElectrumWords::get_is_old_style_mnemonics()) + bool is_deprecated_wallet = m_restore_deterministic_wallet && + (crypto::ElectrumWords::get_is_old_style_word_list() || + crypto::ElectrumWords::get_is_old_style_seed(m_electrum_seed)); + + // Ask for seed language if it is not a wallet restore or if it was a deprecated wallet + // that was earlier used before this restore. + if (!m_restore_deterministic_wallet || is_deprecated_wallet) { - if (crypto::ElectrumWords::get_is_old_style_mnemonics()) + if (is_deprecated_wallet) { // The user had used an older version of the wallet with old style mnemonics. - message_writer(epee::log_space::console_color_green, false) << "\nYou have been using " << - "a deprecated word list file. Please use the new seed that we provide.\n"; + message_writer(epee::log_space::console_color_green, false) << "\nYou had been using " << + "a deprecated version of the wallet. Please use the new seed that we provide.\n"; } std::string mnemonic_language = get_mnemonic_language(); try |