feat(performance): investment performance vs Moscow Exchange index (WealthLedger/main#54) (#200)
This commit was merged in pull request #200.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user