aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-02 09:01:40 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-02 09:04:39 +0000
commit914b1061d49c98b7966a7c6f75dddf2bed159f52 (patch)
treee8032bd628c733639ec92d36bd42371cfdccf763 /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #5486 (diff)
downloadmonero-914b1061d49c98b7966a7c6f75dddf2bed159f52.tar.xz
wallet_rpc_server: use original addresses in destinations in get_transfers
And add them for pending transfers, where they were missing
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_rpc_server.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 4076ae957..5030c0be5 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -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)