From 0d4a7e3e4294250ce46c6a7d2411840d87773037 Mon Sep 17 00:00:00 2001 From: tripathyr Date: Mon, 17 May 2021 16:06:06 +0530 Subject: [PATCH] Modification of condition operator --- lib/services/transaction/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/services/transaction/index.js b/lib/services/transaction/index.js index 51e373f8..f9e4306a 100644 --- a/lib/services/transaction/index.js +++ b/lib/services/transaction/index.js @@ -321,7 +321,7 @@ TransactionService.prototype._getInputValues = function(tx, options, callback) { var output = tx.outputs[outputIndex]; // FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error - if (output = false) { + if (output == false) { log.error('Expected an output, but did not get one for tx: ' + tx.txid() + ' outputIndex: ' + outputIndex); } // assert(output, 'Expected an output, but did not get one for tx: ' + tx.txid() + ' outputIndex: ' + outputIndex); @@ -491,7 +491,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback) } // FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error - if (inputValues = false || inputValues.length != tx.inputs.length) { + if (inputValues == false || inputValues.length != tx.inputs.length) { log.error('Input values missing from tx.'); } // assert(inputValues && inputValues.length === tx.inputs.length, 'Input values missing from tx.'); @@ -502,7 +502,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback) // timestamp tx.__timestamp = self._getBlockTimestamp(opts.block.rhash()); // FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error - if (tx.__timestamp = false) { + if (tx.__timestamp == false) { log.error('Timestamp is required when saving a transaction.'); } // assert(tx.__timestamp, 'Timestamp is required when saving a transaction.'); @@ -510,7 +510,7 @@ TransactionService.prototype._processTransaction = function(tx, opts, callback) // height tx.__height = opts.block.__height; // FLOSight Error Correction from RanchiMall 17th May 2021. removed the unhandled assert and replaced by looging of error - if (tx.__height = false) { + if (tx.__height == false) { log.error('Block height is required when saving a trasnaction.'); } //assert(tx.__height, 'Block height is required when saving a trasnaction.');