From a61e35d4a208542312c0c18c649aeef86727e86f Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Fri, 30 Nov 2018 11:51:46 +0800 Subject: [PATCH] add amount and payment id to show_ringmemberstx_jsonhex --- src/page.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/page.h b/src/page.h index ca2b8fa..eb8b2c2 100644 --- a/src/page.h +++ b/src/page.h @@ -1894,15 +1894,22 @@ show_ringmemberstx_jsonhex(string const& tx_hash_str) {"address", ""}, {"viewkey", ""}, {"spendkey", ""}, + {"amount", 0ull}, + {"change", 0ull}, {"_comment", ""}}; - tx_json["recipient"] = json { - {"seed", ""}, - {"address", ""}, - {"is_subaddress", false}, - {"viewkey", ""}, - {"spendkey", ""}, - {"_comment", ""}}; + tx_json["recipient"] = json::array(); + + + tx_json["recipient"].push_back( + json { {"seed", ""}, + {"address", ""}, + {"is_subaddress", false}, + {"viewkey", ""}, + {"spendkey", ""}, + {"amount", 0ull}, + {"_comment", ""}}); + uint64_t tx_blk_height {0}; @@ -1944,6 +1951,12 @@ show_ringmemberstx_jsonhex(string const& tx_hash_str) return json {"error", "Failed to obtain complete block data"}; } + tx_details txd = get_tx_details(tx); + + tx_json["payment_id"] = pod_to_hex(txd.payment_id); + tx_json["payment_id8"] = pod_to_hex(txd.payment_id8); + tx_json["payment_id8e"] = "placeholder for decrypted value"; + tx_json["block"] = epee::string_tools ::buff_to_hex_nodelimer(complete_block_data_str);