From aeea005c957adc454a48302d9ced1f048a6fa385 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Mon, 10 Jun 2024 18:12:46 +0100 Subject: [PATCH] fixed wallet API usage in GUI wallet --- src/cryptonote_config.h | 1 - src/version.cpp.in | 2 +- src/wallet/api/subaddress_account.cpp | 4 ++-- src/wallet/api/wallet.cpp | 14 +++++++------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index f17a21ac7..60f739696 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -214,7 +214,6 @@ #define HF_VERSION_2021_SCALING 2 #define HF_VERSION_ENABLE_CONVERT 2 #define HF_VERSION_ENABLE_ORACLE 2 -#define HF_VERSION_ENABLE_RETURN 2 #define HF_VERSION_SLIPPAGE_YIELD 2 #define TESTNET_VERSION 5 diff --git a/src/version.cpp.in b/src/version.cpp.in index e85e69973..f1c210dae 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_SALVIUM_VERSION_TAG "7f6b8da" -#define DEF_SALVIUM_VERSION "0.2.3" +#define DEF_SALVIUM_VERSION "0.2.4" #define DEF_MONERO_VERSION_TAG "@VERSIONTAG@" #define DEF_MONERO_VERSION "0.18.3.3" #define DEF_MONERO_RELEASE_NAME "Zero" diff --git a/src/wallet/api/subaddress_account.cpp b/src/wallet/api/subaddress_account.cpp index e8153df3d..2f308e098 100644 --- a/src/wallet/api/subaddress_account.cpp +++ b/src/wallet/api/subaddress_account.cpp @@ -64,8 +64,8 @@ void SubaddressAccountImpl::refresh() i, m_wallet->m_wallet->get_subaddress_as_str({i,0}), m_wallet->m_wallet->get_subaddress_label({i,0}), - cryptonote::print_money(m_wallet->m_wallet->balance(i, false)), - cryptonote::print_money(m_wallet->m_wallet->unlocked_balance(i, false)) + cryptonote::print_money(m_wallet->m_wallet->balance(i, "SAL", false)), + cryptonote::print_money(m_wallet->m_wallet->unlocked_balance(i, "SAL", false)) )); } } diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index bf4127445..eec1de6e4 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1010,12 +1010,12 @@ void WalletImpl::setSubaddressLookahead(uint32_t major, uint32_t minor) uint64_t WalletImpl::balance(uint32_t accountIndex) const { - return m_wallet->balance(accountIndex, false); + return m_wallet->balance(accountIndex, "SAL", false); } uint64_t WalletImpl::unlockedBalance(uint32_t accountIndex) const { - return m_wallet->unlocked_balance(accountIndex, false); + return m_wallet->unlocked_balance(accountIndex, "SAL", false); } uint64_t WalletImpl::blockChainHeight() const @@ -1590,13 +1590,13 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vectoradjust_mixin(mixin_count); if (amount) { - transaction->m_pending_tx = m_wallet->create_transactions_2(dsts, fake_outs_count, 0 /* unlock_time */, + transaction->m_pending_tx = m_wallet->create_transactions_2(dsts, "SAL", "SAL", cryptonote::transaction_type::TRANSFER, fake_outs_count, 0 /* unlock_time */, + adjusted_priority, + extra, subaddr_account, subaddr_indices); + } else { + transaction->m_pending_tx = m_wallet->create_transactions_all(0, cryptonote::transaction_type::TRANSFER, "SAL", info.address, info.is_subaddress, 1, fake_outs_count, 0 /* unlock_time */, adjusted_priority, extra, subaddr_account, subaddr_indices); - } else { - transaction->m_pending_tx = m_wallet->create_transactions_all(0, info.address, info.is_subaddress, 1, fake_outs_count, 0 /* unlock_time */, - adjusted_priority, - extra, subaddr_account, subaddr_indices); } pendingTxPostProcess(transaction);