Hide disabled exchanges from dashboard and fund overview.

Only aggregate and display exchanges with enabled monitoring in system settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-23 18:41:52 +08:00
parent faa41eece1
commit d3d366d0ee
4 changed files with 21 additions and 14 deletions
+2 -4
View File
@@ -73,10 +73,8 @@ def test_build_fund_overview_skips_unmonitored(tmp_path, monkeypatch):
)
assert out["totals"]["total_usdt"] == 40.0
assert out["totals"]["monitored_count"] == 1
assert len(out["accounts"]) == 2
off = next(a for a in out["accounts"] if a["key"] == "gate_bot")
assert off["monitored"] is False
assert off["total_usdt"] is None
assert len(out["accounts"]) == 1
assert all(a["monitored"] for a in out["accounts"])
assert out["totals"]["drawdown"]["max_drawdown_u"] == 0.0