mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
Merge pull request #11061
f98077b wallet: fix split transaction change address display (selsta)
ACKs: jpk68, SNeedlewoods
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user