aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorOran Juice <oranjuices@hotmail.com>2014-09-27 18:20:15 +0530
committerOran Juice <oranjuices@hotmail.com>2014-09-27 18:20:15 +0530
commitf31adbc977939036d51d59e8ddb5cdf2c61ecd97 (patch)
treed966cedaae9d4f2f31b1f779f3cf6619e16e731f /src/simplewallet
parentInforms about old style mnemonics from older wallet and provides a new one. C... (diff)
downloadmonero-f31adbc977939036d51d59e8ddb5cdf2c61ecd97.tar.xz
Doxygen comments in
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp18
-rw-r--r--src/simplewallet/simplewallet.h24
2 files changed, 36 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 2ede2f20f..9d6f23e6b 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -28,6 +28,12 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+/*!
+ * \file simplewallet.cpp
+ *
+ * \brief Source file that defines simple_wallet class.
+ */
+
#include <thread>
#include <iostream>
#include <boost/lexical_cast.hpp>
@@ -438,6 +444,13 @@ bool simple_wallet::try_connect_to_daemon()
return true;
}
+/*!
+ * \brief Gets the word seed language from the user.
+ *
+ * User is asked to choose from a list of supported languages.
+ *
+ * \return The chosen language.
+ */
std::string simple_wallet::get_mnemonic_language()
{
std::vector<std::string> language_list;
@@ -498,15 +511,16 @@ 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())
{
if (crypto::ElectrumWords::get_is_old_style_mnemonics())
{
+ // 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";
}
- // 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.
std::string mnemonic_language = get_mnemonic_language();
try
{
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
index 7a21f1cd2..8567b2343 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -28,6 +28,11 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+/*!
+ * \file simplewallet.h
+ *
+ * \brief Header file that declares simple_wallet class.
+ */
#pragma once
#include <memory>
@@ -41,12 +46,15 @@
#include "password_container.h"
#include "crypto/crypto.h" // for definition of crypto::secret_key
-
+/*!
+ * \namespace cryptonote
+ * \brief Holds cryptonote related classes and helpers.
+ */
namespace cryptonote
{
- /************************************************************************/
- /* */
- /************************************************************************/
+ /*!
+ * \brief Manages wallet operations. This is the most abstracted wallet class.
+ */
class simple_wallet : public tools::i_wallet2_callback
{
public:
@@ -92,6 +100,14 @@ namespace cryptonote
uint64_t get_daemon_blockchain_height(std::string& err);
bool try_connect_to_daemon();
bool ask_wallet_create_if_needed();
+
+ /*!
+ * \brief Gets the word seed language from the user.
+ *
+ * User is asked to choose from a list of supported languages.
+ *
+ * \return The chosen language.
+ */
std::string get_mnemonic_language();
//----------------- i_wallet2_callback ---------------------