diff options
author | stoffu <stoffu@protonmail.ch> | 2018-02-25 22:04:36 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2018-02-25 22:04:36 +0900 |
commit | 71bff546d3224ba6fa49e39296ae0752f1267b70 (patch) | |
tree | a8ac52d88e300555cdf3031bff9bb4367e9b474d /src | |
parent | Merge pull request #3245 (diff) | |
download | monero-71bff546d3224ba6fa49e39296ae0752f1267b70.tar.xz |
wallet api: when restoring from EnglishOld, set language to English
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/api/wallet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 5ce8ede8d..42ce33f0a 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -40,6 +40,7 @@ #include "common/util.h" #include "mnemonics/electrum-words.h" +#include "mnemonics/english.h" #include <boost/format.hpp> #include <sstream> #include <unordered_map> @@ -603,6 +604,9 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c return false; } + if (old_language == crypto::ElectrumWords::old_language_name) + old_language = Language::English().get_language_name(); + try { m_wallet->set_seed_language(old_language); m_wallet->generate(path, password, recovery_key, true, false); |