diff --git a/src/components/organisms/AssetActions/Pool/Transactions.tsx b/src/components/organisms/AssetActions/Pool/Transactions.tsx index b4973822f..2739ecb64 100644 --- a/src/components/organisms/AssetActions/Pool/Transactions.tsx +++ b/src/components/organisms/AssetActions/Pool/Transactions.tsx @@ -7,7 +7,7 @@ import { useAsset } from '../../../../providers/Asset' export default function Transactions(): ReactElement { const [open, setOpen] = useState(false) - const { ddo } = useAsset() + const { price } = useAsset() function handleClick() { setOpen(!open) } @@ -29,7 +29,7 @@ export default function Transactions(): ReactElement { {open === true && ( - + )} ) diff --git a/src/components/organisms/AssetActions/Pool/index.tsx b/src/components/organisms/AssetActions/Pool/index.tsx index 6619e5d2d..e23dddc26 100644 --- a/src/components/organisms/AssetActions/Pool/index.tsx +++ b/src/components/organisms/AssetActions/Pool/index.tsx @@ -95,8 +95,8 @@ export default function Pool(): ReactElement { const [refreshPool, setRefreshPool] = useState(false) const { data: dataLiquidity } = useQuery(poolLiquidityQuery, { variables: { - id: ddo.price.address.toLowerCase(), - shareId: `${ddo.price.address.toLowerCase()}-${ddo.publicKey[0].owner.toLowerCase()}` + id: price.address.toLowerCase(), + shareId: `${price.address.toLowerCase()}-${ddo.publicKey[0].owner.toLowerCase()}` }, pollInterval: 5000 }) @@ -170,7 +170,8 @@ export default function Pool(): ReactElement { const totalUserLiquidityInOcean = userLiquidity?.ocean + userLiquidity?.datatoken * price?.value setTotalUserLiquidityInOcean(totalUserLiquidityInOcean) - const totalLiquidityInOcean = price?.ocean + price?.datatoken * price?.value + const totalLiquidityInOcean = + Number(price?.ocean) + Number(price?.datatoken) * Number(price?.value) setTotalLiquidityInOcean(totalLiquidityInOcean) }, [userLiquidity, price, poolTokens, totalPoolTokens])