feat: render stock logos with signed returns on account page
This commit is contained in:
@@ -45,3 +45,14 @@ export function portfolioErrorCode(error: unknown): string | undefined {
|
||||
? String(error.code)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
const logoSize = 160;
|
||||
|
||||
export function instrumentLogoUrl(
|
||||
logoName: string | null | undefined,
|
||||
): string | null {
|
||||
const stem = logoName?.trim().replace(/\.png$/i, "");
|
||||
return stem
|
||||
? `https://invest-brands.cdn-tinkoff.ru/${stem}x${logoSize}.png`
|
||||
: null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user