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:
@@ -114,7 +114,7 @@ describe('T-Bank persisted read budget', () => {
|
||||
(item) =>
|
||||
item.instrumentKind === 'INSTRUMENT_TYPE_SHARE' &&
|
||||
item.ticker.includes(query),
|
||||
),
|
||||
).map((item) => ({ uid: item.uid, ticker: item.ticker, name: item.name, isin: item.isin, instrumentKind: item.instrumentKind, classCode: item.classCode, apiTradeAvailableFlag: item.apiTradeAvailableFlag })),
|
||||
),
|
||||
findBonds: (_token: string, query: string) =>
|
||||
counted(
|
||||
@@ -123,7 +123,7 @@ describe('T-Bank persisted read budget', () => {
|
||||
(item) =>
|
||||
item.instrumentKind === 'INSTRUMENT_TYPE_BOND' &&
|
||||
item.ticker.includes(query),
|
||||
),
|
||||
).map((item) => ({ uid: item.uid, ticker: item.ticker, name: item.name, isin: item.isin, instrumentKind: item.instrumentKind, classCode: item.classCode, apiTradeAvailableFlag: item.apiTradeAvailableFlag })),
|
||||
),
|
||||
getShare: (_token: string, uid: string) =>
|
||||
counted(
|
||||
@@ -279,9 +279,9 @@ describe('T-Bank persisted read budget', () => {
|
||||
currentPrice: { currency: 'rub', units: '1000' },
|
||||
averagePositionPrice: { currency: 'rub', units: '900' },
|
||||
}],
|
||||
totalsByCurrency: [{ currency: 'RUB', value: '1100' }],
|
||||
cashBalances: [{ currency: 'RUB', value: '100' }],
|
||||
structure: { currencies: [], unvaluedCategories: [] },
|
||||
totals: { currency: 'RUB', value: '1100' },
|
||||
cash: { currency: 'RUB', value: '100' },
|
||||
structure: { totalValue: '1100', hasNegativeValues: false, categories: [], unvaluedCategories: [] },
|
||||
},
|
||||
fetchedAt: now,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user