BUG toFixed 6 instead of 8

This commit is contained in:
Luis Fernando Molina committed 2018-07-22 19:49:54 +02:00
1 parent b3ab5ebc47
commit 896ac0e86d
1 file changed
+3 -2
+3 -2
View File
@@ -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);