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:
@@ -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 },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user