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:
dekun
2026-07-12 08:55:30 +08:00
parent 551c86264a
commit bb53beb22d
9 changed files with 141 additions and 41 deletions
+2 -2
View File
@@ -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 ""