feat: expose instrument brand logo name in portfolio positions

This commit is contained in:
2026-08-24 23:41:48 +03:00
parent 2772d53647
commit 5375e5598a
4 changed files with 21 additions and 3 deletions
+4 -1
View File
@@ -92,6 +92,7 @@ describe('PortfolioService', () => {
ticker: 'ONE',
name: 'Первая позиция',
isin: 'RU000A0JX0J2',
brand: { logoName: 'RU000A0JX0J2x160.png' },
})
.mockRejectedValueOnce(new Error('unavailable'));
@@ -105,6 +106,7 @@ describe('PortfolioService', () => {
currentValue: { currency: 'RUB', value: '6' },
absoluteReturn: { currency: 'RUB', value: '2' },
isin: 'RU000A0JX0J2',
logoName: 'RU000A0JX0J2x160.png',
},
{
figi: 'TWO',
@@ -113,6 +115,7 @@ describe('PortfolioService', () => {
quantity: '-0.5',
currentValue: { currency: 'USD', value: '-2' },
isin: null,
logoName: null,
},
],
cashBalances: [{ currency: 'RUB', value: '1.5' }],
@@ -137,7 +140,7 @@ describe('PortfolioService', () => {
tbank.getInstrumentByUid.mockResolvedValue({ name: 'Имя по UID' });
await expect(service.get('user', 'account')).resolves.toMatchObject({
positions: [{ displayName: 'Имя по UID' }],
positions: [{ displayName: 'Имя по UID', logoName: null }],
});
expect(tbank.getInstrumentByFigi).not.toHaveBeenCalled();
});