diff options
author | Oran Juice <oranjuices@hotmail.com> | 2014-10-02 18:15:18 +0530 |
---|---|---|
committer | Oran Juice <oranjuices@hotmail.com> | 2014-10-02 21:43:28 +0530 |
commit | 4517bac7f3493bd369a05d5a1587765ef72a73da (patch) | |
tree | 9472daaa6e238ee2ef22b1894bdb09bfaffef66b /src/wallet | |
parent | Separated word lists to header files (diff) | |
download | monero-4517bac7f3493bd369a05d5a1587765ef72a73da.tar.xz |
Restructured language sources to be singletons
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 9 | ||||
-rw-r--r-- | src/wallet/wallet2.h | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b8f793d7c..cb6f66b3d 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -88,7 +88,7 @@ void wallet2::init(const std::string& daemon_address, uint64_t upper_transaction //---------------------------------------------------------------------------------------------------- bool wallet2::get_seed(std::string& electrum_words) { - crypto::ElectrumWords::bytes_to_words(get_account().get_keys().m_spend_secret_key, electrum_words); + crypto::ElectrumWords::bytes_to_words(get_account().get_keys().m_spend_secret_key, electrum_words, seed_language); crypto::secret_key second; keccak((uint8_t *)&get_account().get_keys().m_spend_secret_key, sizeof(crypto::secret_key), (uint8_t *)&second, sizeof(crypto::secret_key)); @@ -97,6 +97,13 @@ bool wallet2::get_seed(std::string& electrum_words) return memcmp(second.data,get_account().get_keys().m_view_secret_key.data, sizeof(crypto::secret_key)) == 0; } +/*! + * \brief Sets the seed language + */ +void wallet2::set_seed_language(const std::string &language) +{ + seed_language = language; +} //---------------------------------------------------------------------------------------------------- void wallet2::process_new_transaction(const cryptonote::transaction& tx, uint64_t height) { diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 90918677e..afa42c2d3 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -152,7 +152,10 @@ namespace tools void callback(i_wallet2_callback* callback) { m_callback = callback; } bool get_seed(std::string& electrum_words); - + /*! + * \brief Sets the seed language + */ + void set_seed_language(const std::string &language); void refresh(); void refresh(uint64_t start_height, size_t & blocks_fetched); void refresh(uint64_t start_height, size_t & blocks_fetched, bool& received_money); @@ -236,6 +239,7 @@ namespace tools i_wallet2_callback* m_callback; bool m_testnet; + std::string seed_language; }; } BOOST_CLASS_VERSION(tools::wallet2, 7) |