mirror of
https://github.com/monero-project/monero.git
synced 2024-12-13 11:56:31 +02:00
wallet_rpc_server: use original addresses in destinations in get_transfers
And add them for pending transfers, where they were missing
This commit is contained in:
parent
581994b61c
commit
914b1061d4
@ -385,7 +385,7 @@ namespace tools
|
||||
entry.destinations.push_back(wallet_rpc::transfer_destination());
|
||||
wallet_rpc::transfer_destination &td = entry.destinations.back();
|
||||
td.amount = d.amount;
|
||||
td.address = get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr);
|
||||
td.address = d.original.empty() ? get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr) : d.original;
|
||||
}
|
||||
|
||||
entry.type = "out";
|
||||
@ -410,6 +410,14 @@ namespace tools
|
||||
entry.amount = pd.m_amount_in - pd.m_change - entry.fee;
|
||||
entry.unlock_time = pd.m_tx.unlock_time;
|
||||
entry.note = m_wallet->get_tx_note(txid);
|
||||
|
||||
for (const auto &d: pd.m_dests) {
|
||||
entry.destinations.push_back(wallet_rpc::transfer_destination());
|
||||
wallet_rpc::transfer_destination &td = entry.destinations.back();
|
||||
td.amount = d.amount;
|
||||
td.address = d.original.empty() ? get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr) : d.original;
|
||||
}
|
||||
|
||||
entry.type = is_failed ? "failed" : "pending";
|
||||
entry.subaddr_index = { pd.m_subaddr_account, 0 };
|
||||
for (uint32_t i: pd.m_subaddr_indices)
|
||||
|
Loading…
Reference in New Issue
Block a user