mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5532
46244dd
wallet_rpc_server: use original addresses in destinations in get_transfers (moneromooo-monero)
This commit is contained in:
commit
eedf5106f5
1 changed files with 9 additions and 1 deletions
|
@ -394,7 +394,7 @@ namespace tools
|
||||||
entry.destinations.push_back(wallet_rpc::transfer_destination());
|
entry.destinations.push_back(wallet_rpc::transfer_destination());
|
||||||
wallet_rpc::transfer_destination &td = entry.destinations.back();
|
wallet_rpc::transfer_destination &td = entry.destinations.back();
|
||||||
td.amount = d.amount;
|
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";
|
entry.type = "out";
|
||||||
|
@ -419,6 +419,14 @@ namespace tools
|
||||||
entry.amount = pd.m_amount_in - pd.m_change - entry.fee;
|
entry.amount = pd.m_amount_in - pd.m_change - entry.fee;
|
||||||
entry.unlock_time = pd.m_tx.unlock_time;
|
entry.unlock_time = pd.m_tx.unlock_time;
|
||||||
entry.note = m_wallet->get_tx_note(txid);
|
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.type = is_failed ? "failed" : "pending";
|
||||||
entry.subaddr_index = { pd.m_subaddr_account, 0 };
|
entry.subaddr_index = { pd.m_subaddr_account, 0 };
|
||||||
for (uint32_t i: pd.m_subaddr_indices)
|
for (uint32_t i: pd.m_subaddr_indices)
|
||||||
|
|
Loading…
Reference in a new issue