aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-03-05 23:59:16 +0900
committerstoffu <stoffu@protonmail.ch>2018-03-05 23:59:16 +0900
commit0e7ad2e2c95814ed13b6d84fc3647fa5652cc134 (patch)
treef945dc14b539735b1225d4b30e2462fb95bea5d2 /src/wallet/api/wallet_manager.cpp
parentStagenet (diff)
downloadmonero-0e7ad2e2c95814ed13b6d84fc3647fa5652cc134.tar.xz
Wallet API: generalize 'bool testnet' to 'NetworkType nettype'
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet_manager.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
index 22bc343fb..5b6df8a9c 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -60,46 +60,46 @@ namespace {
namespace Monero {
Wallet *WalletManagerImpl::createWallet(const std::string &path, const std::string &password,
- const std::string &language, bool testnet)
+ const std::string &language, NetworkType nettype)
{
- WalletImpl * wallet = new WalletImpl(testnet);
+ WalletImpl * wallet = new WalletImpl(nettype);
wallet->create(path, password, language);
return wallet;
}
-Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string &password, bool testnet)
+Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string &password, NetworkType nettype)
{
- WalletImpl * wallet = new WalletImpl(testnet);
+ WalletImpl * wallet = new WalletImpl(nettype);
wallet->open(path, password);
//Refresh addressBook
wallet->addressBook()->refresh();
return wallet;
}
-Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &mnemonic, bool testnet, uint64_t restoreHeight)
+Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &mnemonic, NetworkType nettype, uint64_t restoreHeight)
{
- return recoveryWallet(path, "", mnemonic, testnet, restoreHeight);
+ return recoveryWallet(path, "", mnemonic, nettype, restoreHeight);
}
Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
const std::string &language,
- bool testnet,
+ NetworkType nettype,
uint64_t restoreHeight,
const std::string &addressString,
const std::string &viewKeyString,
const std::string &spendKeyString)
{
- return createWalletFromKeys(path, "", language, testnet, restoreHeight,
+ return createWalletFromKeys(path, "", language, nettype, restoreHeight,
addressString, viewKeyString, spendKeyString);
}
Wallet *WalletManagerImpl::recoveryWallet(const std::string &path,
const std::string &password,
const std::string &mnemonic,
- bool testnet,
+ NetworkType nettype,
uint64_t restoreHeight)
{
- WalletImpl * wallet = new WalletImpl(testnet);
+ WalletImpl * wallet = new WalletImpl(nettype);
if(restoreHeight > 0){
wallet->setRefreshFromBlockHeight(restoreHeight);
}
@@ -110,13 +110,13 @@ Wallet *WalletManagerImpl::recoveryWallet(const std::string &path,
Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
const std::string &password,
const std::string &language,
- bool testnet,
+ NetworkType nettype,
uint64_t restoreHeight,
const std::string &addressString,
const std::string &viewKeyString,
const std::string &spendKeyString)
{
- WalletImpl * wallet = new WalletImpl(testnet);
+ WalletImpl * wallet = new WalletImpl(nettype);
if(restoreHeight > 0){
wallet->setRefreshFromBlockHeight(restoreHeight);
}