Leave some rounding error margin in comparison
This commit is contained in:
1 parent
f1c429c6a2
commit
5c66d63fca
1 file changed
+1
-1
+1
-1
@@ -737,7 +737,7 @@
|
||||
sumAssetA = thisObject.truncDecimals(sumAssetA);
|
||||
sumAssetB = thisObject.truncDecimals(sumAssetB);
|
||||
|
||||
if (thisObject.truncDecimals(position.amountA) !== sumAssetA || position.amountB !== sumAssetB) {
|
||||
if (Math.abs(thisObject.truncDecimals(position.amountA) - sumAssetA) > 0.00000001 || Math.abs(position.amountB - sumAssetB) > 0.00000001) {
|
||||
|
||||
logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> position.amountA = " + position.amountA);
|
||||
logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> confirmOrderWasPartiallyExecuted -> sumAssetA = " + sumAssetA);
|
||||
|
||||
Reference in new issue
Block a user