aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-02-11 23:27:30 +0000
committerxiphon <xiphon@protonmail.com>2020-02-11 23:36:50 +0000
commitcc18926ebab0c117b88a08da19bac14021fa4c2d (patch)
tree44066a92f235a625021f714eb1132d0012911da4 /src/wallet/api/wallet.cpp
parentMerge pull request #6145 (diff)
downloadmonero-cc18926ebab0c117b88a08da19bac14021fa4c2d.tar.xz
wallet2_api: wallet recovery - seed offset passphrase support
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 6200c7a1f..00ed2ff65 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -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();