diff options
| author | jeffro256 <jeffro256@tutanota.com> | 2026-01-15 12:44:54 -0600 |
|---|---|---|
| committer | jeffro256 <jeffro256@tutanota.com> | 2026-03-24 08:57:12 -0500 |
| commit | 7a4825b062d0af3fb6e7cb6e8641e1b9da715544 (patch) | |
| tree | 72f65d2c511c7f29befed261b1243913d2b9f74f /src/wallet/wallet_rpc_server.cpp | |
| parent | 23b420a992417abb6131b3d152d7e32adf224351 (diff) | |
| download | monzero-core-7a4825b062d0af3fb6e7cb6e8641e1b9da715544.tar.gz monzero-core-7a4825b062d0af3fb6e7cb6e8641e1b9da715544.tar.xz monzero-core-7a4825b062d0af3fb6e7cb6e8641e1b9da715544.zip | |
wallet: add source info to describe_transfer RPC
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
| -rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 0cf75a1c4..531dc3197 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1517,7 +1517,7 @@ namespace tools for (size_t n = 0; n < tx_constructions.size(); ++n) { const tools::wallet2::tx_construction_data &cd = tx_constructions[n]; - res.desc.push_back({0, 0, std::numeric_limits<uint32_t>::max(), 0, {}, "", 0, "", 0, 0, ""}); + res.desc.push_back({0, 0, std::numeric_limits<uint32_t>::max(), 0, {}, {}, "", 0, "", 0, 0, ""}); wallet_rpc::COMMAND_RPC_DESCRIBE_TRANSFER::transfer_description &desc = res.desc.back(); // Clear the recipients collection ready for this loop iteration tx_dests.clear(); @@ -1548,8 +1548,15 @@ namespace tools for (size_t s = 0; s < cd.sources.size(); ++s) { - desc.amount_in += cd.sources[s].amount; - size_t ring_size = cd.sources[s].outputs.size(); + const cryptonote::tx_source_entry &src_in = cd.sources[s]; + desc.sources.emplace_back(); + wallet_rpc::COMMAND_RPC_DESCRIBE_TRANSFER::source &src_out = desc.sources.back(); + src_out.amount = src_in.amount; + src_out.global_index = src_in.outputs.at(src_in.real_output_in_tx_index).first; + src_out.rct = src_in.rct; + src_out.pubkey = epee::string_tools::pod_to_hex(src_in.outputs.at(src_in.real_output_in_tx_index).second); + desc.amount_in += src_in.amount; + size_t ring_size = src_in.outputs.size(); if (ring_size < desc.ring_size) desc.ring_size = ring_size; } |
