refactor!: support RUB only (WealthLedger/main#55) (#204)
BREAKING CHANGE: per-currency API fields replaced with single RUB Money.
This commit was merged in pull request #204.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
type Valuation = {
|
||||
positions: { currentValue: unknown }[];
|
||||
totalsByCurrency: unknown[];
|
||||
totals: { value: string };
|
||||
};
|
||||
|
||||
const MIN_TOTALS_COUNT = 0;
|
||||
|
||||
export function isCompleteValuation(
|
||||
snapshot: Valuation,
|
||||
): boolean {
|
||||
return snapshot.totalsByCurrency.length > MIN_TOTALS_COUNT &&
|
||||
return Boolean(snapshot.totals) &&
|
||||
snapshot.positions.every((position) => position.currentValue !== null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user