From 4809e3f972fa4c1cf87d20b28ed0df7870036e54 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Wed, 18 Jan 2017 20:15:15 +0800 Subject: [PATCH] fix: POST request of prove sending tx --- main.cpp | 13 ++++++------- src/templates/partials/tx_details.html | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index 92b6c06..b69efe6 100644 --- a/main.cpp +++ b/main.cpp @@ -190,7 +190,7 @@ int main(int ac, const char* av[]) { || post_body.count("viewkey") == 0 || post_body.count("tx_hash") == 0) { - return string("xmr_address, viewkey or tx_hash not provided"); + return string("xmr address, viewkey or tx hash not provided"); } string tx_hash = post_body["tx_hash"]; @@ -205,21 +205,20 @@ int main(int ac, const char* av[]) { map post_body = xmreg::parse_crow_post_data(req.body); - if (post_body.count("xmr_address") == 0 + if (post_body.count("xmraddress") == 0 || post_body.count("txprvkey") == 0 - || post_body.count("tx_hash") == 0) + || post_body.count("txhash") == 0) { - return string("xmr_address, txprvkey or tx_hash not provided"); + return string("xmr address, tx private key or tx hash not provided"); } - string tx_hash = post_body["tx_hash"];; + string tx_hash = post_body["txhash"];; string tx_prv_key = post_body["txprvkey"];; - string xmr_address = post_body["xmr_address"];; + string xmr_address = post_body["xmraddress"];; return xmrblocks.show_prove(tx_hash, xmr_address, tx_prv_key); }); - CROW_ROUTE(app, "/rawtx") ([&](const crow::request& req) { return xmrblocks.show_rawtx(); diff --git a/src/templates/partials/tx_details.html b/src/templates/partials/tx_details.html index 72c0440..4d7088a 100644 --- a/src/templates/partials/tx_details.html +++ b/src/templates/partials/tx_details.html @@ -86,7 +86,7 @@
For RingCT transactions, outputs' amounts are also decoded
- Note: address and viewkey are sent to server, as the calculations are done on the server side + Note: address and viewkey are sent to the server, as the calculations are done on the server side

@@ -107,12 +107,12 @@ Tx private key can be obtained using get_tx_key command in monero-wallet-cli command line tool
- Note: address and tx private key are sent to server, as the calculations are done on the server side + Note: address and tx private key are sent to the server, as the calculations are done on the server side -
+

-
+