Refactor Maker Points logic by removing dislocation calculations and related UI elements. Update MakerPointsEngine to utilize new price fetching methods and streamline order synchronization. Adjust translations and tests accordingly to reflect these changes.

This commit is contained in:
discountry
2026-01-06 16:18:54 +08:00
parent 7aafc3b69d
commit 33b5407245
5 changed files with 11 additions and 132 deletions
-12
View File
@@ -79,10 +79,6 @@ export function MakerPointsApp({ onExit }: MakerPointsAppProps) {
const spreadDisplay =
snapshot.spread != null ? `${formatNumber(snapshot.spread, spreadDigits)} USDT` : "-";
const hasPosition = Math.abs(snapshot.position.positionAmt) > 1e-5;
const markDisplay = Number.isFinite(snapshot.markPrice) ? formatNumber(snapshot.markPrice, priceDigits) : "-";
const dislocationDisplay =
snapshot.dislocationBps != null ? formatNumber(snapshot.dislocationBps, 2) : "-";
const blockDisplay = snapshot.blockedBps > 0 ? String(snapshot.blockedBps) : "-";
const sortedOrders = [...snapshot.openOrders].sort((a, b) =>
(Number(b.updateTime ?? 0) - Number(a.updateTime ?? 0)) || Number(b.orderId) - Number(a.orderId)
@@ -153,13 +149,6 @@ export function MakerPointsApp({ onExit }: MakerPointsAppProps) {
spread: spreadDisplay,
})}
</Text>
<Text>
{t("makerPoints.markLine", {
mark: markDisplay,
bps: dislocationDisplay,
block: blockDisplay,
})}
</Text>
<Text color="gray">{t("trend.statusLine", { status: readyStatus })}</Text>
<Text>
{t("makerPoints.quoteLine", {
@@ -247,4 +236,3 @@ export function MakerPointsApp({ onExit }: MakerPointsAppProps) {
</Box>
);
}