Use hub exchange instances for calculator contract precision.

Load enabled instances from settings, fetch market info via /api/hub/market, and apply exchange-specific amount and price precision in trend and roll calculators.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-23 18:13:02 +08:00
parent d938bc6c59
commit 5e507d0b66
14 changed files with 1140 additions and 204 deletions
+24
View File
@@ -6845,6 +6845,8 @@ body.funds-fullscreen-open {
.calc-field input,
.calc-field select {
width: 100%;
box-sizing: border-box;
background: var(--bg-elevated);
border: 1px solid var(--border);
color: var(--text);
@@ -6854,6 +6856,28 @@ body.funds-fullscreen-open {
font-family: var(--mono);
}
.calc-field-span2 {
grid-column: 1 / -1;
}
.calc-market-info {
padding: 0.55rem 0.55rem 0.55rem 0.75rem;
border-radius: 8px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
font-size: 0.82rem;
line-height: 1.45;
color: var(--muted, #9aa4b2);
}
.calc-market-info strong {
color: var(--text, #e8ecf1);
}
.calc-market-err {
color: #f87171;
}
.calc-actions {
margin-top: 12px;
}