From e5287ede5b446648f48b475dcef5bf02ce099b43 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 3 Dec 2019 09:54:29 -0500 Subject: [PATCH] treat spend keys "000...0" as "" --- src/wallet/monero_wallet.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 5727928..9b11e27 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -1027,13 +1027,15 @@ namespace monero { } string monero_wallet::get_public_spend_key() const { - MTRACE("get_private_spend_key()"); + MTRACE("get_public_spend_key()"); return epee::string_tools::pod_to_hex(m_w2->get_account().get_keys().m_account_address.m_spend_public_key); } string monero_wallet::get_private_spend_key() const { MTRACE("get_private_spend_key()"); - return epee::string_tools::pod_to_hex(m_w2->get_account().get_keys().m_spend_secret_key); + string spend_key = epee::string_tools::pod_to_hex(m_w2->get_account().get_keys().m_spend_secret_key); + if (spend_key == "0000000000000000000000000000000000000000000000000000000000000000") spend_key = ""; + return spend_key; } string monero_wallet::get_primary_address() const {