mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
http_client arg added to create_wallet_from_keys()
This commit is contained in:
@@ -860,7 +860,7 @@ namespace monero {
|
||||
return wallet;
|
||||
}
|
||||
|
||||
monero_wallet_core* monero_wallet_core::create_wallet_from_keys(const string& path, const string& password, const monero_network_type network_type, const string& address, const string& view_key, const string& spend_key, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& language) {
|
||||
monero_wallet_core* monero_wallet_core::create_wallet_from_keys(const string& path, const string& password, const monero_network_type network_type, const string& address, const string& view_key, const string& spend_key, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& language, shared_ptr<epee::net_utils::http::abstract_http_client> http_client) {
|
||||
MTRACE("create_wallet_from_keys(path, password, address, view_key, spend_key, network_type, daemon_connection, restore_height, language)");
|
||||
monero_wallet_core* wallet = new monero_wallet_core();
|
||||
|
||||
@@ -907,7 +907,8 @@ namespace monero {
|
||||
}
|
||||
|
||||
// initialize wallet
|
||||
wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true));
|
||||
if (http_client == nullptr) wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true));
|
||||
else wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true, http_client));
|
||||
if (has_spend_key && has_view_key) wallet->m_w2->generate(path, password, info.address, spend_key_sk, view_key_sk);
|
||||
else if (has_spend_key) wallet->m_w2->generate(path, password, spend_key_sk, true, false);
|
||||
else wallet->m_w2->generate(path, password, info.address, view_key_sk);
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace monero {
|
||||
* @param language is the wallet and mnemonic's language (defaults to "English")
|
||||
* @return a pointer to the wallet instance
|
||||
*/
|
||||
static monero_wallet_core* create_wallet_from_keys(const string& path, const string& password, const monero_network_type network_type, const string& address, const string& view_key, const string& spend_key, const monero_rpc_connection& daemon_connection = monero_rpc_connection(), uint64_t restore_height = 0, const string& language = "English");
|
||||
static monero_wallet_core* create_wallet_from_keys(const string& path, const string& password, const monero_network_type network_type, const string& address, const string& view_key, const string& spend_key, const monero_rpc_connection& daemon_connection = monero_rpc_connection(), uint64_t restore_height = 0, const string& language = "English", shared_ptr<epee::net_utils::http::abstract_http_client> http_client = nullptr);
|
||||
|
||||
/**
|
||||
* Get a list of available languages for the wallet's mnemonic phrase.
|
||||
|
||||
Reference in New Issue
Block a user