Merge pull request #3314

71bff546 wallet api: when restoring from EnglishOld, set language to English (stoffu)
This commit is contained in:
Riccardo Spagni 2018-03-05 19:12:24 +02:00
commit 5b25cbb5a7
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 4 additions and 0 deletions

View File

@ -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);