From 0ea1f8c0b43e10a5008ccb16264df8f3ce0b1b10 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Thu, 26 Oct 2023 18:50:38 +0200 Subject: [PATCH] fix: pre-tests --- .../details/tabs/VaultDetailsStrategies.tsx | 22 ++----------------- .../details/tabs/VaultDetailsStrategies.tsx | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx b/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx index ea22cde4e..fc5c36381 100755 --- a/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx +++ b/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx @@ -1,9 +1,6 @@ import {useMemo, useState} from 'react'; -import {useIsMounted} from '@react-hookz/web'; import {findLatestApr} from '@vaults/components/details/tabs/findLatestApr'; -import {GraphForStrategyReports} from '@vaults/components/graphs/GraphForStrategyReports'; import {yDaemonReportsSchema} from '@vaults/schemas/reportsSchema'; -import {Renderable} from '@yearn-finance/web-lib/components/Renderable'; import {IconCopy} from '@yearn-finance/web-lib/icons/IconCopy'; import {toAddress} from '@yearn-finance/web-lib/utils/address'; import {formatToNormalizedValue, toBigInt} from '@yearn-finance/web-lib/utils/format.bigNumber'; @@ -41,7 +38,6 @@ function RiskScoreElement({label, value}: TRiskScoreElementProps): ReactElement function VaultDetailsStrategy({currentVault, strategy}: TProps): ReactElement { const {yDaemonBaseUri} = useYDaemonBaseURI({chainID: currentVault.chainID}); - const isMounted = useIsMounted(); const riskScoreElementsMap = useMemo((): TRiskScoreElementProps[] => { const {riskDetails} = strategy.risk || {}; @@ -101,7 +97,7 @@ function VaultDetailsStrategy({currentVault, strategy}: TProps): ReactElement { className={'text-neutral-600'} dangerouslySetInnerHTML={{ __html: parseMarkdown( - strategy.description.replaceAll('{{token}}', currentVault.token.symbol) + (strategy.description || '').replaceAll('{{token}}', currentVault.token.symbol) ) }} /> @@ -174,24 +170,10 @@ function VaultDetailsStrategy({currentVault, strategy}: TProps): ReactElement {

{'Perfomance fee'}

- {formatPercent((strategy.details?.performanceFee || 0) * 100, 0)} + {`${formatAmount(Number(strategy.details?.performanceFee || 0) / 100, 0, 2)}%`}
- -
-

{'Historical APR'}

-
- - - -
-
diff --git a/apps/vaults/components/details/tabs/VaultDetailsStrategies.tsx b/apps/vaults/components/details/tabs/VaultDetailsStrategies.tsx index 201b0e005..3f86f48ad 100755 --- a/apps/vaults/components/details/tabs/VaultDetailsStrategies.tsx +++ b/apps/vaults/components/details/tabs/VaultDetailsStrategies.tsx @@ -101,7 +101,7 @@ function VaultDetailsStrategy({currentVault, strategy}: TProps): ReactElement { className={'text-neutral-600'} dangerouslySetInnerHTML={{ __html: parseMarkdown( - strategy.description.replaceAll('{{token}}', currentVault.token.symbol) + (strategy.description || '').replaceAll('{{token}}', currentVault.token.symbol) ) }} />