From b7254bc3ac5f8d4f4d544da3dc96a92f9fb6fc6c Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sun, 20 Nov 2022 19:46:22 +0530 Subject: [PATCH] btcOperator v1.0.13c bug fix Fixed: tx outputs with 0 value (such as change amount) not removed --- btcOperator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btcOperator.js b/btcOperator.js index 85ae761..0f2786a 100644 --- a/btcOperator.js +++ b/btcOperator.js @@ -1,4 +1,4 @@ -(function (EXPORTS) { //btcOperator v1.0.13b +(function (EXPORTS) { //btcOperator v1.0.13c /* BTC Crypto and API Operator */ const btcOperator = EXPORTS; @@ -346,7 +346,7 @@ return reject("Send amount is less than fee"); } - tx.outs = tx.outs.filter(o => o.value !== 0); //remove all output with value 0 + tx.outs = tx.outs.filter(o => o.value != 0); //remove all output with value 0 result.output_size = output_size; result.output_amount = total_amount - (fee_from_receiver ? result.fee : 0); result.total_size = BASE_TX_SIZE + output_size + result.input_size;