From bd465c0404e76f69fe04b875312413caa0195a67 Mon Sep 17 00:00:00 2001 From: MrX-SNX Date: Thu, 29 Aug 2024 20:51:17 +0100 Subject: [PATCH] fix: price undefined (#423) * fix: price * ref: using ?? operator --- liquidity/ui/src/components/Pools/PoolCards/PoolCard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liquidity/ui/src/components/Pools/PoolCards/PoolCard.tsx b/liquidity/ui/src/components/Pools/PoolCards/PoolCard.tsx index dec98bb13..cf252d5b0 100644 --- a/liquidity/ui/src/components/Pools/PoolCards/PoolCard.tsx +++ b/liquidity/ui/src/components/Pools/PoolCards/PoolCard.tsx @@ -76,7 +76,7 @@ export const PoolCard = ({ const vaultTVL = collateralTypes?.reduce((acc, type) => { const price = wei( collateralPrices?.find((price) => price.symbol.toUpperCase() === type.symbol.toUpperCase()) - ?.price || 0 + ?.price ?? 0 ); const amount = wei(type.collateralDeposited, Number(type.decimals), true); const value = price.mul(amount); @@ -274,7 +274,7 @@ export const PoolCard = ({ const price = wei( collateralPrices?.find( (price) => price.symbol.toUpperCase() === type.symbol.toUpperCase() - )?.price + )?.price ?? 0 ); const collateralApr = apr.collateralAprs.find(