Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/app/schemas/StrategyMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import z from 'zod'
import { z } from 'zod'
import { AddressSchema } from '.'

export const StrategyMetadataSchema = z.object({
Expand Down Expand Up @@ -40,8 +40,10 @@ export const StrategyMetadataSchema = z.object({
'League DAO',
'Lido Finance',
'MakerDAO',
'Morpho',
'Mushroom Finance',
'Notional Finance',
'Pendle',
'Pool Together',
'Scream',
'Solidex Finance',
Expand All @@ -63,6 +65,8 @@ export const StrategyMetadataSchema = z.object({
'veDAO',
]),
),
githubCode: z.string().optional(),
strategyType: z.string().optional(),
})

export type StrategyMetadata = z.infer<typeof StrategyMetadataSchema>
2 changes: 1 addition & 1 deletion packages/app/schemas/cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const collections = {
schema: StrategyMetadataSchema,
displayName: 'Strategies',
icon: 'strategy',
searchFields: ['name', 'address'] as const,
searchFields: ['name', 'address', 'githubCode', 'strategyType'] as const,
filterableBooleanFields: [] as const,
listItemTemplate: 'strategy' as const,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import z from 'zod'
import { z } from 'zod'

export const AddressSchema = z.string().regex(/^0x[0-9a-fA-F]{40}$/)
2 changes: 1 addition & 1 deletion packages/app/scripts/etl-vault-metadata-from-ydaemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const YDaemonVaultMetadataSchema = z.object({
chainID: z.number(),
address: AddressSchema,
registry: optionalString(AddressSchema),
type: z.enum(['Yearn Vault', 'Experimental Yearn Vault', 'Automated Yearn Vault', 'Single Strategy']),
type: z.enum(['Yearn Vault', 'Experimental Yearn Vault', 'Automated Yearn Vault', 'Single Strategy', 'None']),
kind: optionalString(z.enum(['Multi Strategy', 'Legacy', 'Single Strategy'])),
endorsed: z.boolean().optional(),
metadata: z
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/SchemaForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type React from 'react'
import type { ReactNode } from 'react'
import { createContext, useContext, useEffect, useState } from 'react'
import z from 'zod'
import { z } from 'zod'
import { cn } from '../../lib/cn'
import Input from './eg/elements/Input'
import Switch from './eg/elements/Switch'
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/ChainIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getChainIconUrl } from '../../../lib/assets'
import { chains } from '../../../lib/chains'
import { cn } from './cn'
import { cn } from '../../../lib/cn'
import ImgOrBg from './ImgOrBg'

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/ChainSelect/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { memo, useMemo } from 'react'
import { PiCaretDownBold, PiFireSimpleFill } from 'react-icons/pi'
import { chains } from '../../../../lib/chains'
import { cn } from '../../../../lib/cn'
import ChainIcon from '../ChainIcon'
import { cn } from '../cn'
import { HoverCard, HoverCardTrigger } from '../HoverCard'
import { useMounted } from '../hooks/useMounted'
import FlyInFromBottom from '../motion/FlyInFromBottom'
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, type HTMLAttributes } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

export type FooterProps = HTMLAttributes<HTMLElement> & {
className?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/HoverCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react'
import { useCallback } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'
import Card from '../elements/Card'
import { useHoverCard } from './useHoverCard'

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/HoverSelect/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ReactNode, useCallback, useMemo } from 'react'
import { PiCaretDownBold } from 'react-icons/pi'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'
import { HoverCard, HoverCardTrigger } from '../HoverCard'
import { type SelectOption, useHoverSelect } from './useHoverSelect'

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/ImgOrBg.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ImgHTMLAttributes } from 'react'
import { useMemo, useState } from 'react'
import { cn } from './cn'
import { cn } from '../../../lib/cn'

interface ImgOrBg extends ImgHTMLAttributes<HTMLImageElement> {
bgClassName?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from './cn'
import { cn } from '../../../lib/cn'

export default function Skeleton({
className,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/TokenIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getTokenIconUrl } from '../../../lib/assets'
import { cn } from '../../../lib/cn'
import ChainIcon from './ChainIcon'
import { cn } from './cn'
import ImgOrBg from './ImgOrBg'

type Props = {
Expand Down
6 changes: 0 additions & 6 deletions packages/app/src/components/eg/cn.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ButtonHTMLAttributes, forwardRef } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

export type Variant = 'accent' | 'primary' | 'secondary' | 'error' | 'busy'

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HTMLAttributes, ReactNode } from 'react'
import { forwardRef } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

export type CardProps = HTMLAttributes<HTMLDivElement> & {
className?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, type InputHTMLAttributes } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

export const InputClassName = cn(`
relative px-4 py-3
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { HTMLAttributes } from 'react'
import { forwardRef } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

export type ListItemProps = HTMLAttributes<HTMLDivElement> & {
className?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as _Switch from '@radix-ui/react-switch'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'

const Switch = ({
label,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/elements/Textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, type TextareaHTMLAttributes } from 'react'
import { cn } from '../cn'
import { cn } from '../../../../lib/cn'
import { InputClassName } from './Input'

type Props = TextareaHTMLAttributes<HTMLTextAreaElement> & {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/eg/motion/FlyInFromBottom.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Transition } from 'framer-motion'
import { motion } from 'framer-motion'
import { useMemo } from 'react'
import { cn } from '../cn'
import { cn } from '../../../lib/cn'
import { springs } from '../lib/motion'

export default function FlyInFromBottom({
Expand Down
46 changes: 0 additions & 46 deletions packages/app/src/hooks/useStrategyMeta.ts

This file was deleted.

46 changes: 0 additions & 46 deletions packages/app/src/hooks/useVaultMeta.ts

This file was deleted.

91 changes: 0 additions & 91 deletions packages/app/src/routes/Strategies.tsx

This file was deleted.

Loading