misc fixes

This commit is contained in:
auruya
2025-11-10 17:01:47 +03:00
committed by Some Random Crypto Guy
parent 3e49572539
commit 538e4a5d1f
2 changed files with 16 additions and 16 deletions

View File

@@ -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;
}

View File

@@ -926,12 +926,12 @@ std::string WalletImpl::publicSpendKey() const
std::vector<std::string> 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