Skip to content

Commit

Permalink
remove custom resolver - use something like strapi instead
Browse files Browse the repository at this point in the history
  • Loading branch information
apexearth committed Nov 19, 2024
1 parent 77128bc commit d8d840a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 149 deletions.
18 changes: 0 additions & 18 deletions src/server-extension/strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Arg, Field, Info, Int, ObjectType, Query, Resolver } from 'type-graphql
import { EntityManager, LessThanOrEqual } from 'typeorm'

import { StrategyBalance } from '@model'
import { getStrategyMeta } from '@shared/strategies-meta'
import { IStrategyData } from '@templates/strategy'
import { addresses } from '@utils/addresses'
import { baseAddresses } from '@utils/addresses-base'
Expand All @@ -31,8 +30,6 @@ export class Strategy {
kind!: string
@Field(() => [Balance], { nullable: false })
balances!: Balance[]
@Field(() => StrategyMeta, { nullable: true })
meta!: StrategyMeta | null

constructor(props: Partial<Strategy>) {
Object.assign(this, props)
Expand All @@ -59,20 +56,6 @@ export class Balance {
}
}

@ObjectType()
export class StrategyMeta {
@Field(() => String, { nullable: false })
title!: string
@Field(() => String, { nullable: false })
description!: string
@Field(() => String, { nullable: false })
color!: string

constructor(props: Partial<StrategyMeta>) {
Object.assign(this, props)
}
}

const otokens: Record<string, readonly IStrategyData[]> = {
[addresses.oeth.address]: oethStrategies,
[addresses.ousd.address]: ousdStrategies,
Expand Down Expand Up @@ -105,7 +88,6 @@ export class StrategyResolver {
address: s.address,
oTokenAddress: s.oTokenAddress,
kind: s.kind,
meta: getStrategyMeta(s.oTokenAddress, s.address) ?? null,
balances: compact(
await Promise.all(
s.assets.map((asset) =>
Expand Down
131 changes: 0 additions & 131 deletions src/shared/strategies-meta.ts

This file was deleted.

0 comments on commit d8d840a

Please sign in to comment.