Skip to content

Commit

Permalink
build: Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karelianpie committed Jun 12, 2023
1 parent 7247363 commit 0798f94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/ybal/components/HarvestsListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {formatDate} from '@yearn-finance/web-lib/utils/format.time';
import {ImageWithFallback} from '@common/components/ImageWithFallback';

import type {ReactElement} from 'react';
import type {TYDaemonHarvests} from '@common/types/yearn';
import type {TYDaemonVaultHarvest} from '@common/schemas/yDaemonVaultsSchemas';

type TRowProps = {
label: string;
Expand All @@ -28,7 +28,7 @@ function Row({label, value, className, valueClassName}: TRowProps): ReactElement
);
}

function HarvestListRow({harvest}: {harvest: TYDaemonHarvests}): ReactElement {
function HarvestListRow({harvest}: {harvest: TYDaemonVaultHarvest}): ReactElement {
const vaultName = toAddress(harvest.vaultAddress) === STYBAL_TOKEN_ADDRESS ? 'st-yBal' : 'lp-yBal';
const gain = formatToNormalizedAmount(toBigInt(harvest.profit) - toBigInt(harvest.loss));
const value = formatUSD(Number(harvest.profitValue) - Number(harvest.lossValue));
Expand Down
6 changes: 3 additions & 3 deletions apps/ycrv/components/Harvests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {HarvestListRow} from '@yCRV/components/HarvestsListRow';
import {useYCRV} from '@yCRV/contexts/useYCRV';

import type {ReactElement} from 'react';
import type {TYDaemonHarvests} from '@common/types/yearn';
import type {TYDaemonVaultHarvest, TYDaemonVaultHarvests} from '@common/schemas/yDaemonVaultsSchemas';

function Harvests(): ReactElement {
const {harvests} = useYCRV();
const [category, set_category] = useState('all');

const filteredHarvests = useMemo((): TYDaemonHarvests[] => {
const filteredHarvests = useMemo((): TYDaemonVaultHarvests => {
const _harvests = [...(harvests || [])];
if (category === 'st-yCRV') {
return _harvests.filter((harvest): boolean => toAddress(harvest.vaultAddress) === STYCRV_TOKEN_ADDRESS);
Expand Down Expand Up @@ -53,7 +53,7 @@ function Harvests(): ReactElement {
</div>
<div className={'mt-4 grid w-full grid-cols-1 md:mt-0'}>
<HarvestListHead />
{(filteredHarvests || [])?.map((harvest: TYDaemonHarvests, index: number): ReactElement => {
{(filteredHarvests || [])?.map((harvest: TYDaemonVaultHarvest, index: number): ReactElement => {
return <HarvestListRow key={`${harvest.timestamp}_${harvest.vaultAddress}_${index}`} harvest={harvest} />;
})}
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/ycrv/components/HarvestsListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {formatDate} from '@yearn-finance/web-lib/utils/format.time';
import {ImageWithFallback} from '@common/components/ImageWithFallback';

import type {ReactElement} from 'react';
import type {TYDaemonHarvests} from '@common/types/yearn';
import type {TYDaemonVaultHarvest} from '@common/schemas/yDaemonVaultsSchemas';

function HarvestListRow({harvest}: {harvest: TYDaemonHarvests}): ReactElement {
function HarvestListRow({harvest}: {harvest: TYDaemonVaultHarvest}): ReactElement {
return (
<div className={'yearn--table-wrapper'}>
<div className={'yearn--table-token-section'}>
Expand Down

0 comments on commit 0798f94

Please sign in to comment.