Merge pull request #11061

f98077b wallet: fix split transaction change address display (selsta)

ACKs: jpk68, SNeedlewoods
This commit is contained in:
tobtoht
2026-08-12 13:31:58 +00:00
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -7595,7 +7595,8 @@ bool simple_wallet::accept_loaded_tx(const std::function<size_t()> get_num_txes,
std::string change_string;
if (change > 0)
{
std::string address = get_account_address_as_str(m_wallet->nettype(), get_tx(0).subaddr_account > 0, get_tx(0).change_dts.addr);
const tools::wallet2::tx_construction_data &cd = get_tx(first_known_non_zero_change_index);
std::string address = get_account_address_as_str(m_wallet->nettype(), cd.subaddr_account > 0, cd.change_dts.addr);
change_string += (boost::format(tr("%s change to %s")) % print_money(change) % address).str();
}
else
+2 -1
View File
@@ -212,7 +212,8 @@ bool UnsignedTransactionImpl::checkLoadedTx(const std::function<size_t()> get_nu
std::string change_string;
if (change > 0)
{
std::string address = get_account_address_as_str(m_wallet.m_wallet->nettype(), get_tx(0).subaddr_account > 0, get_tx(0).change_dts.addr);
const tools::wallet2::tx_construction_data &cd = get_tx(first_known_non_zero_change_index);
std::string address = get_account_address_as_str(m_wallet.m_wallet->nettype(), cd.subaddr_account > 0, cd.change_dts.addr);
change_string += (boost::format(tr("%s change to %s")) % cryptonote::print_money(change) % address).str();
}
else
+1 -2
View File
@@ -1638,8 +1638,7 @@ namespace tools
if (desc.change_amount > 0)
{
const tools::wallet2::tx_construction_data &cd0 = tx_constructions[0];
desc.change_address = get_account_address_as_str(m_wallet->nettype(), cd0.subaddr_account > 0, cd0.change_dts.addr);
desc.change_address = get_account_address_as_str(m_wallet->nettype(), cd.subaddr_account > 0, cd.change_dts.addr);
res.summary.change_address = desc.change_address;
}