feat: expose instrument brand logo name in portfolio positions
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user