bugfixing

This commit is contained in:
MuslemRahimi 2024-11-27 19:34:57 +01:00
parent fa9e2a1726
commit 46eda73380
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@
} else if (type === "Q") { } else if (type === "Q") {
$wsBidPrice = typeof bp !== "undefined" ? bp : null; $wsBidPrice = typeof bp !== "undefined" ? bp : null;
$wsAskPrice = typeof ap !== "undefined" ? ap : null; $wsAskPrice = typeof ap !== "undefined" ? ap : null;
$realtimePrice = typeof lp !== "undefined" ? lp : $wsAskPrice; $realtimePrice = $wsAskPrice?.toFixed(2);
} }
// Update price increase state // Update price increase state

View File

@ -148,7 +148,7 @@
if (newItem) { if (newItem) {
// Calculate the new changePercentage // Calculate the new changePercentage
const baseLine = item?.price / (1 + item?.changesPercentage / 100); const baseLine = item?.price / (1 + item?.changesPercentage / 100);
const newPrice = newItem?.lp; const newPrice = newItem?.ap;
const newChangePercentage = (newPrice / baseLine - 1) * 100; const newChangePercentage = (newPrice / baseLine - 1) * 100;
// Update the item directly in the oldList // Update the item directly in the oldList