From 896ac0e86d07851e2aebe025c7ef8585a4807f0a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 22 Jul 2018 19:49:54 +0200 Subject: [PATCH] BUG toFixed 6 instead of 8 --- Assistant.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assistant.js b/Assistant.js index 806dcd5d3..27012b155 100644 --- a/Assistant.js +++ b/Assistant.js @@ -730,13 +730,14 @@ sumAssetA = parseFloat(sumAssetA).toFixed(8); sumAssetB = parseFloat(sumAssetB).toFixed(8); - if (parseFloat(position.amountA).toFixed(6) !== sumAssetA || position.amountB !== sumAssetB ) { + if (parseFloat(position.amountA).toFixed(8) !== sumAssetA || position.amountB !== sumAssetB) { + logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> position.amountA = " + position.amountA); logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> sumAssetA = " + sumAssetA); logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> position.amountB = " + position.amountB); logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> sumAssetB = " + sumAssetB); - logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> Cannot be confirmed that a partially execution was done well."); + logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> Cannot be confirmed that a partiall execution was done well."); /* There are diferences on the responses between the getPosition and getTrades that causes some issues, let's retry. */ callBack(global.DEFAULT_RETRY_RESPONSE);