Add per-account-type splitEnabled flag from the catalog
When the master marks an account type splitEnabled=false, big days trade as one unsplit leg (the legacy one-and-done behavior); min-day bumps are unaffected. Missing field — older master or pre-toggle cached catalog — defaults to enabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3ef9486977
commit
a36e227e74
+3
-1
@@ -154,7 +154,9 @@ function validatePayload(raw: unknown): FirmCatalogPayload {
|
||||
if (typeof type[key] !== 'number') throw new Error(`account type ${j} is missing ${key}`);
|
||||
}
|
||||
if (!isStages(type.withdrawalStages)) throw new Error(`account type ${j} has bad withdrawalStages`);
|
||||
return type as unknown as CatalogAccountType;
|
||||
// Lenient like platform: a master from before the split toggle
|
||||
// doesn't send the field, and those account types all split.
|
||||
return { ...type, splitEnabled: type.splitEnabled !== false } as unknown as CatalogAccountType;
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user