Hide zero USDT in options balance labels and add swap/transfer all buttons.
Skip 0 balances in header display; fill max funding/trading amount on 全部兑换/全部划转. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -90,9 +90,9 @@ def options_funding_label(
|
||||
funding_usdt: float | None = None,
|
||||
) -> str:
|
||||
parts: list[str] = []
|
||||
if funding_usdc is not None:
|
||||
if funding_usdc is not None and float(funding_usdc) > 0:
|
||||
parts.append(f"{float(funding_usdc):.2f} USDC")
|
||||
if funding_usdt is not None:
|
||||
if funding_usdt is not None and float(funding_usdt) > 0:
|
||||
parts.append(f"{float(funding_usdt):.2f} USDT")
|
||||
return " · ".join(parts) if parts else "—"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user