Mati changes
This commit is contained in:
1 parent
fc19e0ac31
commit
4055aed528
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -711,10 +711,10 @@
|
||||
sumAssetA = sumAssetA + Number(exchangePosition.amountA);
|
||||
sumAssetB = sumAssetB + Number(exchangePosition.amountB);
|
||||
|
||||
sumAssetA = Number(sumAssetA.toFixed(8));
|
||||
sumAssetB = Number(sumAssetB.toFixed(8));
|
||||
sumAssetA = Number(sumAssetA.toFixed(5));
|
||||
sumAssetB = Number(sumAssetB.toFixed(5));
|
||||
|
||||
if (position.amountA !== sumAssetA || position.amountB !== sumAssetB ) {
|
||||
if (position.amountA.toFixed(5) !== sumAssetA || position.amountB.toFixed(5) !== 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);
|
||||
|
||||
+1
-1
@@ -263,7 +263,7 @@
|
||||
if (pPosition.type === "buy") {
|
||||
newAmount = pPosition.amountA / pNewRate;
|
||||
} else {
|
||||
newAmount = pPosition.amountB * pNewRate;
|
||||
newAmount = pPosition.amountB;
|
||||
}
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] movePosition -> newAmount = " + newAmount); }
|
||||
|
||||
Reference in new issue
Block a user