refactor!: support RUB only (WealthLedger/main#55)
Filter non-RUB data at ingest, collapse per-currency collections into single RUB Money, drop currency from TbankPortfolioValuePoint, remove NON_RUB_ACTIVITY and screener currency filter. BREAKING CHANGE: per-currency API fields replaced with single RUB Money; stock screener currency param removed.
This commit is contained in:
@@ -61,10 +61,10 @@ function projectedMoney(
|
||||
value: string,
|
||||
currency: string | undefined,
|
||||
): UpcomingEventDto['projectedAmount'] {
|
||||
const normalizedCurrency = currency?.trim().toUpperCase();
|
||||
if (!normalizedCurrency) return null;
|
||||
// RUB-only: projected income in other currencies is filtered out.
|
||||
if (currency?.trim().toUpperCase() !== 'RUB') return null;
|
||||
return {
|
||||
currency: normalizedCurrency,
|
||||
currency: 'RUB',
|
||||
value: formatDecimal(multiply(quantity, decimalFromString(value))),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user