From 75735e9491a386570f1d32a97b7c5bef23c1c470 Mon Sep 17 00:00:00 2001 From: Sorin Chis Date: Tue, 17 Dec 2024 18:54:34 +0200 Subject: [PATCH] add missing case --- .../portfolio/useCases/TokenDetails/HeaderDetails/Header.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/yoroi-extension/app/UI/features/portfolio/useCases/TokenDetails/HeaderDetails/Header.tsx b/packages/yoroi-extension/app/UI/features/portfolio/useCases/TokenDetails/HeaderDetails/Header.tsx index 7bc3d929e0..236a2d6f48 100644 --- a/packages/yoroi-extension/app/UI/features/portfolio/useCases/TokenDetails/HeaderDetails/Header.tsx +++ b/packages/yoroi-extension/app/UI/features/portfolio/useCases/TokenDetails/HeaderDetails/Header.tsx @@ -39,6 +39,10 @@ const HeaderSection = ({ tokenInfo }: Props): JSX.Element => { const tokenQuantityAsBigInt = bigNumberToBigInt(new BigNumber(tokenInfo.quantity)); const tokenDecimals = !isPrimaryToken && tokenInfo.info.numberOfDecimals; + if (tokenPrice === undefined && !isPrimaryToken) { + return '-'; + } + const totaPrice = atomicBreakdown(tokenQuantityAsBigInt, tokenDecimals) .bn.times(tokenPrice ?? 1) .times(String(ptPrice))