mirror of
https://github.com/monero-project/monero.git
synced 2026-01-14 22:03:25 -08:00
wallet2_api: wallet recovery - seed offset passphrase support
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user