修复币本位报价误走USDC,中控补资金账户并隐藏零币余额

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-20 13:08:28 +08:00
parent 73efad6fa5
commit f3de3763bb
6 changed files with 226 additions and 18 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ def _fmt_coin_amount(v: float | None) -> str | None:
n = float(v)
except (TypeError, ValueError):
return None
if abs(n) < 1e-12:
if n <= 0:
return None
txt = f"{n:.6f}".rstrip("0").rstrip(".")
return txt or None