From 884b99f7bddb64eddf129cba2bb474fef134886d Mon Sep 17 00:00:00 2001 From: joeuhren Date: Fri, 18 Oct 2019 23:04:46 -0600 Subject: [PATCH] fix private to private tx --- lib/explorer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/explorer.js b/lib/explorer.js index 5024c88..5720993 100644 --- a/lib/explorer.js +++ b/lib/explorer.js @@ -333,9 +333,11 @@ module.exports = { } else { module.exports.convert_to_satoshi(parseFloat(vanon.vpub_new), function(amount_sat){ if (vhidden.length > 0 && (!vout || vout.length == 0) && (!vin || vin.length == 0)) { - // add a private out address for the special case where hidden sender is sending to hidden recipient - arr_vout.push({addresses:"private_tx", amount:amount_sat}); + // hidden sender is sending to hidden recipient + // the sent and received values are not known in this case. only the fee paid is known and subtracted from the sender. + arr_vout.push({addresses:"private_tx", amount:0}); } + // add a private send address with the known amount sent arr_vin.push({addresses:"private_tx", amount:amount_sat}); }); }