refactor!: support RUB only (WealthLedger/main#55) (#204)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 1m32s
Backend verify / verify (push) Failing after 9m25s

BREAKING CHANGE: per-currency API fields replaced with single RUB Money.
This commit was merged in pull request #204.
This commit is contained in:
2026-11-11 10:07:11 +03:00
parent 85d65f8997
commit 809936e62d
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 },
],
},
});