From 71bff546d3224ba6fa49e39296ae0752f1267b70 Mon Sep 17 00:00:00 2001 From: stoffu Date: Sun, 25 Feb 2018 22:04:36 +0900 Subject: wallet api: when restoring from EnglishOld, set language to English --- src/wallet/api/wallet.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wallet/api') 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 #include #include @@ -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); -- cgit v1.2.3