aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp
diff options
context:
space:
mode:
authorm2049r <30435443+m2049r@users.noreply.github.com>2018-01-11 16:12:27 +0100
committerm2049r <30435443+m2049r@users.noreply.github.com>2018-01-17 18:46:31 +0100
commit939629e837d744118acd1191bd08f8627c704402 (patch)
tree4c70094a7e8cf407383c5963fbfd801a25a434f9 /src/wallet/api/wallet_manager.cpp
parentMerge pull request #3091 (diff)
downloadmonero-939629e837d744118acd1191bd08f8627c704402.tar.xz
Wallet API: all recover options with password
also renamed memo => mnemonic in api method parms
Diffstat (limited to 'src/wallet/api/wallet_manager.cpp')
-rw-r--r--src/wallet/api/wallet_manager.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
index a6e5e551e..2dce97f36 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -76,17 +76,39 @@ Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string
return wallet;
}
-Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &memo, bool testnet, uint64_t restoreHeight)
+Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &mnemonic, bool testnet, uint64_t restoreHeight)
+{
+ return recoveryWallet(path, "", mnemonic, testnet, restoreHeight);
+}
+
+Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
+ const std::string &language,
+ bool testnet,
+ uint64_t restoreHeight,
+ const std::string &addressString,
+ const std::string &viewKeyString,
+ const std::string &spendKeyString)
+{
+ return createWalletFromKeys(path, "", language, testnet, restoreHeight,
+ addressString, viewKeyString, spendKeyString);
+}
+
+Wallet *WalletManagerImpl::recoveryWallet(const std::string &path,
+ const std::string &password,
+ const std::string &mnemonic,
+ bool testnet,
+ uint64_t restoreHeight)
{
WalletImpl * wallet = new WalletImpl(testnet);
if(restoreHeight > 0){
wallet->setRefreshFromBlockHeight(restoreHeight);
}
- wallet->recover(path, memo);
+ wallet->recover(path, password, mnemonic);
return wallet;
}
-Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
+Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
+ const std::string &password,
const std::string &language,
bool testnet,
uint64_t restoreHeight,
@@ -98,7 +120,7 @@ Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
if(restoreHeight > 0){
wallet->setRefreshFromBlockHeight(restoreHeight);
}
- wallet->recoverFromKeys(path, language, addressString, viewKeyString, spendKeyString);
+ wallet->recoverFromKeysWithPassword(path, password, language, addressString, viewKeyString, spendKeyString);
return wallet;
}