feat(performance): investment performance vs Moscow Exchange index (WealthLedger/main#54) (#200)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 1m7s
Backend verify / verify (push) Failing after 7m19s

This commit was merged in pull request #200.
This commit is contained in:
2026-11-08 16:45:29 +03:00
parent 84433ee207
commit fee61537b6
28 changed files with 1507 additions and 4 deletions
@@ -0,0 +1,13 @@
type Valuation = {
positions: { currentValue: unknown }[];
totalsByCurrency: unknown[];
};
const MIN_TOTALS_COUNT = 0;
export function isCompleteValuation(
snapshot: Valuation,
): boolean {
return snapshot.totalsByCurrency.length > MIN_TOTALS_COUNT &&
snapshot.positions.every((position) => position.currentValue !== null);
}