From 7b5213c0079a0866d1d20798c6703fc271f484b3 Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 21 Sep 2024 07:42:57 -0400 Subject: [PATCH] apply unwrap(unwrap()) to light wallet keys --- src/wallet/wallet2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 88240acee3..8c710b4813 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3930,7 +3930,7 @@ void wallet2::light_wallet_refresh(uint64_t & blocks_fetched, bool& received_mon MDEBUG("light_wallet_refresh()"); std::string address = get_account().get_public_address_str(m_nettype); - std::string view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); + std::string view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); MDEBUG("light_wallet_refresh(): get_unspent_outs"); @@ -10960,7 +10960,7 @@ void wallet2::light_wallet_get_subaddrs() { tools::COMMAND_RPC_GET_SUBADDRS::response ores; oreq.address = get_account().get_public_address_str(m_nettype); - oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); + oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); m_daemon_rpc_mutex.lock(); bool r = invoke_http_json("/get_subaddrs", oreq, ores, rpc_timeout, "POST"); @@ -10991,7 +10991,7 @@ bool wallet2::light_wallet_upsert_subaddrs(std::vector all_subaddrs; oreq.address = get_account().get_public_address_str(m_nettype); - oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); + oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); oreq.get_all = true; for (cryptonote::subaddress_index subaddr : subaddrs) { @@ -11035,7 +11035,7 @@ bool wallet2::light_wallet_provision_subaddrs(uint32_t maj_i, uint32_t min_i, ui tools::COMMAND_RPC_PROVISION_SUBADDRS::response ores; std::vector all_subaddrs; oreq.address = get_account().get_public_address_str(m_nettype); - oreq.view_key = string_tools::pod_to_hex(get_account().get_keys().m_view_secret_key); + oreq.view_key = string_tools::pod_to_hex(unwrap(unwrap(get_account().get_keys().m_view_secret_key))); oreq.get_all = true; m_daemon_rpc_mutex.lock();