单笔期权默认改为币本位;未配置时按coin处理

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-20 14:05:44 +08:00
parent 6c49c7d51c
commit 4fb3be35ef
14 changed files with 34 additions and 25 deletions
@@ -1143,7 +1143,7 @@ function formatOptionsFundingLabel(usdc, usdt, eth, marginMode, underly) {
return `${n.toFixed(2)} USDC`;
}
function formatTradingAccountLabel(usdt, eth, btc, marginMode) {
const mode = String(marginMode || "usdc").toLowerCase();
const mode = String(marginMode || "coin").toLowerCase();
if (mode !== "coin") {
if (usdt === null || usdt === undefined || usdt === "") return "—";
const n = Number(usdt);
@@ -1203,7 +1203,7 @@ function accountSnapshotFundingMissing(data){
let accountSnapshotRetryCount = 0;
function applyAccountSnapshot(data){
if(!data || typeof data !== "object") return;
const coinMode = String(data.options_margin_mode || "usdc").toLowerCase() === "coin";
const coinMode = String(data.options_margin_mode || "coin").toLowerCase() === "coin";
if(typeof data.show_perp_funds !== "undefined"){
applyPerpFundsVisibility(data.show_perp_funds !== false || coinMode);
} else if (coinMode) {