diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index c532b3764..44145a61a 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -3875,23 +3875,10 @@ bool simple_wallet::ask_wallet_create_if_needed() */ void simple_wallet::print_seed(const epee::wipeable_string &seed) { - success_msg_writer(true) << "\n" << boost::format(tr("NOTE: the following %s can be used to recover access to your wallet. " - "Write them down and store them somewhere safe and secure. Please do not store them in " - "your email or on file storage services outside of your immediate control.\n")) % (m_wallet->multisig() ? tr("string") : tr("25 words")); - // don't log int space_index = 0; size_t len = seed.size(); for (const char *ptr = seed.data(); len--; ++ptr) { - if (*ptr == ' ') - { - if (space_index == 15 || space_index == 7) - putchar('\n'); - else - putchar(*ptr); - ++space_index; - } - else putchar(*ptr); } putchar('\n'); @@ -4639,40 +4626,9 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version) */ std::string simple_wallet::get_mnemonic_language() { - std::vector language_list_self, language_list_english; - const std::vector &language_list = m_use_english_language_names ? language_list_english : language_list_self; - std::string language_choice; - int language_number = -1; - crypto::ElectrumWords::get_language_list(language_list_self, false); - crypto::ElectrumWords::get_language_list(language_list_english, true); - std::cout << tr("List of available languages for your wallet's seed:") << std::endl; - std::cout << tr("If your display freezes, exit blind with ^C, then run again with --use-english-language-names") << std::endl; - int ii; - std::vector::const_iterator it; - for (it = language_list.begin(), ii = 0; it != language_list.end(); it++, ii++) - { - std::cout << ii << " : " << *it << std::endl; - } - while (language_number < 0) - { - language_choice = input_line(tr("Enter the number corresponding to the language of your choice")); - if (std::cin.eof()) - return std::string(); - try - { - language_number = std::stoi(language_choice); - if (!((language_number >= 0) && (static_cast(language_number) < language_list.size()))) - { - language_number = -1; - fail_msg_writer() << tr("invalid language choice entered. Please try again.\n"); - } - } - catch (const std::exception &e) - { - fail_msg_writer() << tr("invalid language choice entered. Please try again.\n"); - } - } - return language_list_self[language_number]; + std::vector language_list; + crypto::ElectrumWords::get_language_list(language_list, m_use_english_language_names); + return language_list[1]; } //---------------------------------------------------------------------------------------------------- boost::optional simple_wallet::get_and_verify_password() const @@ -4777,11 +4733,9 @@ boost::optional simple_wallet::new_wallet(const boost::pr "your wallet again (your wallet keys are NOT at risk in any case).\n") ; - if (!two_random) - { - print_seed(electrum_words); - } - success_msg_writer() << "**********************************************************************"; + success_msg_writer() << "******************************************************************SEED"; + print_seed(electrum_words); + success_msg_writer() << "******************************************************************SEED"; return password; } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index c7135783c..2d94b6236 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1115,7 +1115,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended): m_trusted_daemon(false), m_nettype(nettype), m_multisig_rounds_passed(0), - m_always_confirm_transfers(true), + m_always_confirm_transfers(false), m_print_ring_members(false), m_store_tx_info(true), m_default_mixin(0), @@ -1126,13 +1126,13 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended): m_refresh_from_block_height(0), m_explicit_refresh_from_block_height(true), m_confirm_non_default_ring_size(true), - m_ask_password(AskPasswordOnAction), + m_ask_password(AskPasswordNever), m_min_output_count(0), m_min_output_value(0), m_merge_destinations(false), - m_confirm_backlog(true), + m_confirm_backlog(false), m_confirm_backlog_threshold(0), - m_confirm_export_overwrite(true), + m_confirm_export_overwrite(false), m_auto_low_priority(true), m_segregate_pre_fork_outputs(false), m_key_reuse_mitigation2(false), @@ -3900,6 +3900,12 @@ void wallet2::change_password(const std::string &filename, const epee::wipeable_ */ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_string& password) { + m_ask_password = AskPasswordNever; + m_always_confirm_transfers = false; + m_confirm_backlog = false; + m_confirm_export_overwrite = false; + m_confirm_non_default_ring_size = true; + rapidjson::Document json; wallet2::keys_file_data keys_file_data; std::string buf;