Enhance environment variable parsing and account snapshot validation

- Introduced `normalizeEnvValue` function to improve handling of environment variable values, including trimming, unquoting, and stripping inline comments.
- Updated `resolveSymbolFromEnv` and parsing functions to utilize the new normalization logic.
- Added `validateAccountSnapshotForSymbol` function to validate account snapshots, ensuring numeric fields are correctly formatted and flagging any issues.
- Implemented tests for environment variable parsing and account snapshot validation to ensure robustness and correctness.
This commit is contained in:
discountry
2026-01-24 22:46:14 +08:00
parent fe7b8eb6f3
commit a629bc940c
14 changed files with 738 additions and 46 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export interface TradeNotification {
title: string;
message: string;
accountLabel?: string;
details?: Record<string, string | number | boolean | null>;
details?: Record<string, string | number | boolean | null | string[]>;
timestamp?: number;
}