Skip to content

Commit

Permalink
fix: 0.00 tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Oct 17, 2023
1 parent 71f2a19 commit 07dc461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/vaults/components/list/VaultsListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,15 @@ export function VaultForwardAPR({currentVault}: {currentVault: TYDaemonVault}):
return <VaultHistoricalAPR currentVault={currentVault} />;
}

const hasZeroAPR = isZero(currentVault.apr?.netAPR) || Number(currentVault.apr?.netAPR.toFixed(2)) === 0;
return (
<div className={'flex flex-col text-right'}>
<b className={'yearn--table-data-section-item-value'}>
<Renderable
shouldRender={!(currentVault.apr?.type === 'new' && isZero(currentVault.apr.forwardAPR.netAPR))}
fallback={'New'}>
<RenderAmount
shouldHideTooltip={hasZeroAPR}
value={currentVault.apr.forwardAPR.netAPR}
symbol={'percent'}
decimals={6}
Expand Down

0 comments on commit 07dc461

Please sign in to comment.