Fall back to base minTradingDays when stage doesn't specify one

When a withdrawal stage has minTradingDays unset (0 or missing), use
the account's base minTradingDays instead of overriding to 0. This
was causing min-day reservation to skip and return consistency-based
targets instead of the min-day floor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-04-20 20:14:52 -05:00
co-authored by Claude Opus 4.6
parent cd0f1e6fac
commit 9c2b2278eb
+2 -1
View File
@@ -33,7 +33,8 @@ export function resolveEffectiveConfig(
}
const idx = Math.min(withdrawalCount - 1, withdrawalStages.length - 1);
const stage = withdrawalStages[idx];
return { profitTarget: stage.profit, consistency: stage.consistency, minTradingDays: stage.minTradingDays };
// Fall back to base minTradingDays when the stage doesn't specify one (0 or missing)
return { profitTarget: stage.profit, consistency: stage.consistency, minTradingDays: stage.minTradingDays || minTradingDays };
}
return { profitTarget, consistency, minTradingDays };
}