Merge pull request #6334

cc18926 wallet2_api: wallet recovery - seed offset passphrase support (xiphon)
This commit is contained in:
luigi1111
2020-04-04 12:41:32 -05:00
5 changed files with 14 additions and 6 deletions
+5 -1
View File
@@ -725,7 +725,7 @@ bool WalletImpl::recover(const std::string &path, const std::string &seed)
return recover(path, "", seed);
}
bool WalletImpl::recover(const std::string &path, const std::string &password, const std::string &seed)
bool WalletImpl::recover(const std::string &path, const std::string &password, const std::string &seed, const std::string &seed_offset/* = {}*/)
{
clearStatus();
m_errorString.clear();
@@ -743,6 +743,10 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c
setStatusError(tr("Electrum-style word list failed verification"));
return false;
}
if (!seed_offset.empty())
{
recovery_key = cryptonote::decrypt_key(recovery_key, seed_offset);
}
if (old_language == crypto::ElectrumWords::old_language_name)
old_language = Language::English().get_language_name();