refactor!: support RUB only (WealthLedger/main#55)
Backend verify / commits (pull_request) Successful in 1m38s
Backend verify / security (pull_request) Successful in 1m28s
Backend verify / verify (pull_request) Successful in 8m40s

Filter non-RUB data at ingest and collapse per-currency collections
into a single RUB Money. Drop currency from TbankPortfolioValuePoint,
remove NON_RUB_ACTIVITY and the screener currency filter.

BREAKING CHANGE: per-currency API fields replaced with single RUB Money.
This commit is contained in:
2026-11-11 09:40:25 +03:00
parent 85d65f8997
commit 83df5f0be6
61 changed files with 617 additions and 735 deletions
+25 -38
View File
@@ -111,25 +111,20 @@ describe('Portfolio structure HTTP contract', () => {
expect((response.body as { data: unknown }).data).toMatchObject({
structure: {
unvaluedCategories: [],
currencies: [
totalValue: id === 'all' ? '200' : '100',
hasNegativeValues: false,
categories: [
{
currency: 'RUB',
totalValue: id === 'all' ? '200' : '100',
hasNegativeValues: false,
categories: [
{
type: 'STOCK',
value: id === 'all' ? '120' : '60',
sharePercent: '60',
},
{ type: 'BOND', value: '0', sharePercent: '0' },
{ type: 'OTHER', value: '0', sharePercent: '0' },
{
type: 'CASH',
value: id === 'all' ? '80' : '40',
sharePercent: '40',
},
],
type: 'STOCK',
value: id === 'all' ? '120' : '60',
sharePercent: '60',
},
{ type: 'BOND', value: '0', sharePercent: '0' },
{ type: 'OTHER', value: '0', sharePercent: '0' },
{
type: 'CASH',
value: id === 'all' ? '80' : '40',
sharePercent: '40',
},
],
},
@@ -149,15 +144,11 @@ describe('Portfolio structure HTTP contract', () => {
expect((response.body as { data: unknown }).data).toMatchObject({
structure: {
unvaluedCategories: [{ type: 'BOND', count: 1 }],
currencies: [
{
categories: [
{ sharePercent: null },
{ sharePercent: null },
{ sharePercent: null },
{ value: '40', sharePercent: null },
],
},
categories: [
{ sharePercent: null },
{ sharePercent: null },
{ sharePercent: null },
{ value: '40', sharePercent: null },
],
},
});
@@ -174,17 +165,13 @@ describe('Portfolio structure HTTP contract', () => {
.expect(200);
expect((response.body as { data: unknown }).data).toMatchObject({
structure: {
currencies: [
{
hasNegativeValues: true,
totalValue: '150',
categories: [
{ value: '120', sharePercent: null },
{ sharePercent: null },
{ sharePercent: null },
{ value: '30', sharePercent: null },
],
},
hasNegativeValues: true,
totalValue: '150',
categories: [
{ value: '120', sharePercent: null },
{ sharePercent: null },
{ sharePercent: null },
{ value: '30', sharePercent: null },
],
},
});