diff --git a/README.md b/README.md index b7b7691..229bdf4 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,15 @@ The values given, can be checked using Monero daemon's `print_coinbase_tx_sum` For example, for the above example: `print_coinbase_tx_sum 0 1313449`. To disable the monitor, simply restart the explorer without `--enable-emission-monitor` flag. + +## Enable JavaScript for decoding proving transactions + +By default, decoding and proving tx's outputs are done on the server side. To do this on the client side +(private view and tx keys are not send to the server) JavaScript-based decoding can be enabled: + +``` +xmrblocks --enable-js +``` ## Enable SSL (https) diff --git a/src/templates/partials/tx_details.html b/src/templates/partials/tx_details.html index 209a5ea..1a125f6 100644 --- a/src/templates/partials/tx_details.html +++ b/src/templates/partials/tx_details.html @@ -217,13 +217,10 @@ return; } - // when using subaddress, there can be more than one tx_prv_key - var multiple_tx_prv_keys = parse_str_secret_key(tx_prv_key); - - //console.log("multiple_tx_prv_keys: ", multiple_tx_prv_keys); - - try { + // when using subaddress, there can be more than one tx_prv_key + var multiple_tx_prv_keys = parse_str_secret_key(tx_prv_key); + var address_decoded = decode_address(address); decodeOutputs(tx_json, address_decoded.view, tx_prv_key, address_decoded.spend, payment_id, @@ -244,7 +241,7 @@ var num_keys = Math.floor(key_str.length / 64); if (num_keys * 64 != key_str.length) - throw "num_keys * 64 != key_str.length for " + num_keys + " and " + key_str; + throw "num_keys * 64 != key_str.length; for (var i = 0; i < num_keys; i++) {