diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp index 7d3dc15b5..2b4db1aa9 100644 --- a/src/wallet/api/transaction_history.cpp +++ b/src/wallet/api/transaction_history.cpp @@ -176,9 +176,9 @@ void TransactionHistoryImpl::refresh() uint64_t change = pd.m_change == (uint64_t)-1 ? 0 : pd.m_change; // change may not be known uint64_t fee = pd.m_amount_in - pd.m_amount_out; uint64_t amount = pd.m_amount_in - change - fee; - if (ptx.tx.type == cryptonote::transaction_type::AUDIT || - ptx.tx.type == cryptonote::transaction_type::BURN || - ptx.tx.type == cryptonote::transaction_type::STAKE) { + if (pd.m_tx.type == cryptonote::transaction_type::AUDIT || + pd.m_tx.type == cryptonote::transaction_type::BURN || + pd.m_tx.type == cryptonote::transaction_type::STAKE) { amount = pd.m_tx.amount_burnt; if (fee > amount) fee -= amount; } @@ -221,9 +221,9 @@ void TransactionHistoryImpl::refresh() uint64_t change = pd.m_change == (uint64_t)-1 ? 0 : pd.m_change; // change may not be known uint64_t fee = pd.m_amount_in - pd.m_amount_out; uint64_t amount = pd.m_amount_in - change - fee; - if (ptx.tx.type == cryptonote::transaction_type::AUDIT || - ptx.tx.type == cryptonote::transaction_type::BURN || - ptx.tx.type == cryptonote::transaction_type::STAKE) { + if (pd.m_tx.type == cryptonote::transaction_type::AUDIT || + pd.m_tx.type == cryptonote::transaction_type::BURN || + pd.m_tx.type == cryptonote::transaction_type::STAKE) { amount = pd.m_tx.amount_burnt; if (fee > amount) fee -= amount; } diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index b14955916..27383e8bb 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -926,12 +926,12 @@ std::string WalletImpl::publicSpendKey() const std::vector WalletImpl::carrotKeys() const { return { - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().s_master), - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().k_prove_spend), - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().s_view_balance), - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().k_view_incoming), - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().k_generate_image), - epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().s_generate_address) + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().s_master))), + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().k_prove_spend))), + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().s_view_balance))), + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().k_view_incoming))), + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().k_generate_image))), + epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().s_generate_address))) }; } @@ -947,22 +947,22 @@ std::string WalletImpl::publicMultisigSignerKey() const std::string WalletImpl::secretViewBalance() const { - return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().s_view_balance); + return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().s_view_balance))); } std::string WalletImpl::secretProveSpend() const { - return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().k_prove_spend); + return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().k_prove_spend))); } std::string WalletImpl::secretGenerateAddress() const { - return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().s_generate_address); + return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().s_generate_address))); } std::string WalletImpl::secretGenerateImage() const { - return epee::string_tools::pod_to_hex(m_wallet->get_account().get_keys().k_generate_image); + return epee::string_tools::pod_to_hex(unwrap(unwrap(m_wallet->get_account().get_keys().k_generate_image))); } std::string WalletImpl::path() const