fix: use strategy config for position value ratio validation instead of hardcoded 1.5x

This commit is contained in:
tinkle-community
2025-12-13 20:47:15 +08:00
parent 0381815a13
commit c4363f3bc7
2 changed files with 15 additions and 10 deletions

View File

@@ -83,7 +83,8 @@ func TestLeverageFallback(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := validateDecision(&tt.decision, tt.accountEquity, tt.btcEthLeverage, tt.altcoinLeverage)
// Use default position value ratios for testing (10x for BTC/ETH, 1.5x for altcoins)
err := validateDecision(&tt.decision, tt.accountEquity, tt.btcEthLeverage, tt.altcoinLeverage, 10.0, 1.5)
// Check error status
if (err != nil) != tt.wantError {