fix private to private tx

This commit is contained in:
joeuhren
2019-10-18 23:04:46 -06:00
parent 392bdb030b
commit 884b99f7bd
+4 -2
View File
@@ -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});
});
}