@clonegod/ttd-bsc-common 3.1.61 → 3.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -135,9 +135,9 @@ class QuotePriceVerify {
|
|
|
135
135
|
const side = isBuy ? 'BUY' : 'SELL';
|
|
136
136
|
if (refPrice <= 0 || execPriceNum <= 0)
|
|
137
137
|
return;
|
|
138
|
-
const diffBps = (
|
|
138
|
+
const diffBps = (refPrice - execPriceNum) / refPrice * 10000;
|
|
139
139
|
const absDiffBps = Math.abs(diffBps);
|
|
140
|
-
const status = absDiffBps <
|
|
140
|
+
const status = absDiffBps < 5 ? '✅' : absDiffBps < 10 ? '⚠️' : '❌';
|
|
141
141
|
const usdStr = swapUsd > 0 ? `$${swapUsd.toFixed(0)}` : '$?';
|
|
142
142
|
const maxUsd = cached.quoteAmountUsd * 2;
|
|
143
143
|
const inRange = swapUsd <= 0 || swapUsd <= maxUsd;
|