Skip to content

Commit

Permalink
Fix issue with ts and lint in earn app
Browse files Browse the repository at this point in the history
  • Loading branch information
piekczyk committed Nov 6, 2024
1 parent 671d27a commit f492213
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FC, type ReactNode, useMemo, useState } from 'react'
import { Table, type TableSortedColumn } from '@summerfi/app-earn-ui'
import { type UsersActivity } from '@summerfi/app-types'

import { type UsersActivity } from '@/app/server-handlers/sdk/get-users-activity'
import { userActivityColumns } from '@/features/user-activity/table/user-activity-columns'
import { userActivityMapper } from '@/features/user-activity/table/user-activity-mapper'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { getMedian } from '@summerfi/app-earn-ui'
import { UserActivityType } from '@summerfi/app-types'
import { UserActivityType, type UsersActivity } from '@summerfi/app-types'
import BigNumber from 'bignumber.js'

import { type UsersActivity } from '@/app/server-handlers/sdk/get-users-activity'

export const getUsersActivityMedianDeposit = (usersActivity: UsersActivity) =>
getMedian(
usersActivity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type UserActivity, type UsersActivity } from '@/app/server-handlers/sdk/get-users-activity'
import { type UserActivity, type UsersActivity } from '@summerfi/app-types'

const userActivityFilterStrategies = ({
strategyFilter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import {
type TableSortedColumn,
WithArrow,
} from '@summerfi/app-earn-ui'
import { type TokenSymbolsList, UserActivityType } from '@summerfi/app-types'
import { type TokenSymbolsList, UserActivityType, type UsersActivity } from '@summerfi/app-types'
import { formatCryptoBalance, timeAgo } from '@summerfi/app-utils'
import BigNumber from 'bignumber.js'
import Link from 'next/link'

import { type UsersActivity } from '@/app/server-handlers/sdk/get-users-activity'
import { userActivitySorter } from '@/features/user-activity/table/user-activity-sorter'

const activityLabelMap = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { type TableSortedColumn } from '@summerfi/app-earn-ui'
import { type UsersActivity } from '@summerfi/app-types'
import { simpleSort, SortDirection } from '@summerfi/app-utils'

import { type UsersActivity } from '@/app/server-handlers/sdk/get-users-activity'

export const userActivitySorter = ({
data,
sortConfig,
Expand Down
8 changes: 2 additions & 6 deletions sdk/subgraph-manager-common/src/generated/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6961,14 +6961,14 @@ export type GetUsersActivityQuery = { __typename?: 'Query', positions: Array<{ _
export type GetVaultsQueryVariables = Exact<{ [key: string]: never; }>;


export type GetVaultsQuery = { __typename?: 'Query', vaults: Array<{ __typename?: 'Vault', inputTokenBalance: bigint, id: string, name?: string | null, rewardTokenEmissionsUSD?: Array<string> | null, outputTokenPriceUSD?: string | null, depositLimit: bigint, createdTimestamp: bigint, totalValueLockedUSD: string, cumulativeTotalRevenueUSD: string, cumulativeSupplySideRevenueUSD: string, cumulativeProtocolSideRevenueUSD: string, lastUpdateTimestamp: bigint, apr7d: string, apr30d: string, apr90d: string, apr180d: string, apr365d: string, calculatedApr: string, aprValues: Array<string>, protocol: { __typename?: 'YieldAggregator', network: Network }, rewardTokens?: Array<{ __typename?: 'RewardToken', id: string, token: { __typename?: 'Token', id: string, symbol: string, decimals: number } }> | null, arks: Array<{ __typename?: 'Ark', id: string, name?: string | null, createdTimestamp: bigint, lastUpdateTimestamp: bigint, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, fees: Array<{ __typename?: 'VaultFee', id: string, feePercentage?: string | null, feeType: VaultFeeType }> }>, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, outputToken?: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number } | null }> };
export type GetVaultsQuery = { __typename?: 'Query', vaults: Array<{ __typename?: 'Vault', id: string, name?: string | null, rewardTokenEmissionsUSD?: Array<string> | null, outputTokenPriceUSD?: string | null, depositLimit: bigint, createdTimestamp: bigint, totalValueLockedUSD: string, cumulativeTotalRevenueUSD: string, cumulativeSupplySideRevenueUSD: string, cumulativeProtocolSideRevenueUSD: string, lastUpdateTimestamp: bigint, apr7d: string, apr30d: string, apr90d: string, apr180d: string, apr365d: string, calculatedApr: string, aprValues: Array<string>, protocol: { __typename?: 'YieldAggregator', network: Network }, rewardTokens?: Array<{ __typename?: 'RewardToken', id: string, token: { __typename?: 'Token', id: string, symbol: string, decimals: number } }> | null, arks: Array<{ __typename?: 'Ark', id: string, name?: string | null, createdTimestamp: bigint, lastUpdateTimestamp: bigint, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, fees: Array<{ __typename?: 'VaultFee', id: string, feePercentage?: string | null, feeType: VaultFeeType }> }>, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, outputToken?: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number } | null }> };

export type GetVaultQueryVariables = Exact<{
id: Scalars['ID']['input'];
}>;


export type GetVaultQuery = { __typename?: 'Query', vault?: { __typename?: 'Vault', inputTokenBalance: bigint, id: string, name?: string | null, rewardTokenEmissionsUSD?: Array<string> | null, outputTokenPriceUSD?: string | null, depositLimit: bigint, createdTimestamp: bigint, totalValueLockedUSD: string, cumulativeTotalRevenueUSD: string, cumulativeSupplySideRevenueUSD: string, cumulativeProtocolSideRevenueUSD: string, lastUpdateTimestamp: bigint, apr7d: string, apr30d: string, apr90d: string, apr180d: string, apr365d: string, calculatedApr: string, aprValues: Array<string>, protocol: { __typename?: 'YieldAggregator', network: Network }, rewardTokens?: Array<{ __typename?: 'RewardToken', id: string, token: { __typename?: 'Token', id: string, symbol: string, decimals: number } }> | null, rebalances: Array<{ __typename?: 'Rebalance', id: string, amount: bigint, amountUSD: string, timestamp: bigint, asset: { __typename?: 'Token', id: string, symbol: string, decimals: number }, from: { __typename?: 'Ark', name?: string | null, depositLimit: bigint, calculatedApr: string, totalValueLockedUSD: string }, to: { __typename?: 'Ark', name?: string | null, depositLimit: bigint, calculatedApr: string, totalValueLockedUSD: string }, toPostAction: { __typename?: 'PostActionArkSnapshot', totalValueLockedUSD: string, depositLimit: bigint }, fromPostAction: { __typename?: 'PostActionArkSnapshot', totalValueLockedUSD: string, depositLimit: bigint }, protocol: { __typename?: 'YieldAggregator', name: string, network: Network }, vault: { __typename?: 'Vault', id: string, name?: string | null, inputToken: { __typename?: 'Token', id: string, symbol: string } } }>, arks: Array<{ __typename?: 'Ark', id: string, name?: string | null, depositLimit: bigint, cumulativeDeposits: bigint, cumulativeEarnings: bigint, cumulativeWithdrawals: bigint, inputTokenBalance: bigint, calculatedApr: string, createdTimestamp: bigint, lastUpdateTimestamp: bigint, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, dailySnapshots: Array<{ __typename?: 'ArkDailySnapshot', id: string, apr: string, totalValueLockedUSD: string, inputTokenBalance: bigint }>, hourlySnapshots: Array<{ __typename?: 'ArkHourlySnapshot', id: string, calculatedApr: string, totalValueLockedUSD: string, inputTokenBalance: bigint }>, fees: Array<{ __typename?: 'VaultFee', id: string, feePercentage?: string | null, feeType: VaultFeeType }> }>, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, outputToken?: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number } | null } | null };
export type GetVaultQuery = { __typename?: 'Query', vault?: { __typename?: 'Vault', id: string, name?: string | null, rewardTokenEmissionsUSD?: Array<string> | null, outputTokenPriceUSD?: string | null, depositLimit: bigint, createdTimestamp: bigint, totalValueLockedUSD: string, cumulativeTotalRevenueUSD: string, cumulativeSupplySideRevenueUSD: string, cumulativeProtocolSideRevenueUSD: string, lastUpdateTimestamp: bigint, apr7d: string, apr30d: string, apr90d: string, apr180d: string, apr365d: string, calculatedApr: string, aprValues: Array<string>, protocol: { __typename?: 'YieldAggregator', network: Network }, rewardTokens?: Array<{ __typename?: 'RewardToken', id: string, token: { __typename?: 'Token', id: string, symbol: string, decimals: number } }> | null, rebalances: Array<{ __typename?: 'Rebalance', id: string, amount: bigint, amountUSD: string, timestamp: bigint, asset: { __typename?: 'Token', id: string, symbol: string, decimals: number }, from: { __typename?: 'Ark', name?: string | null, depositLimit: bigint, calculatedApr: string, totalValueLockedUSD: string }, to: { __typename?: 'Ark', name?: string | null, depositLimit: bigint, calculatedApr: string, totalValueLockedUSD: string }, toPostAction: { __typename?: 'PostActionArkSnapshot', totalValueLockedUSD: string, depositLimit: bigint }, fromPostAction: { __typename?: 'PostActionArkSnapshot', totalValueLockedUSD: string, depositLimit: bigint }, protocol: { __typename?: 'YieldAggregator', name: string, network: Network }, vault: { __typename?: 'Vault', id: string, name?: string | null, inputToken: { __typename?: 'Token', id: string, symbol: string } } }>, arks: Array<{ __typename?: 'Ark', id: string, name?: string | null, depositLimit: bigint, cumulativeDeposits: bigint, cumulativeEarnings: bigint, cumulativeWithdrawals: bigint, createdTimestamp: bigint, lastUpdateTimestamp: bigint, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, dailySnapshots: Array<{ __typename?: 'ArkDailySnapshot', id: string, apr: string, totalValueLockedUSD: string, inputTokenBalance: bigint }>, hourlySnapshots: Array<{ __typename?: 'ArkHourlySnapshot', id: string, calculatedApr: string, totalValueLockedUSD: string, inputTokenBalance: bigint }>, fees: Array<{ __typename?: 'VaultFee', id: string, feePercentage?: string | null, feeType: VaultFeeType }> }>, inputToken: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number }, outputToken?: { __typename?: 'Token', id: string, name: string, symbol: string, decimals: number } | null } | null };


export const GetGlobalRebalancesDocument = gql`
Expand Down Expand Up @@ -7143,7 +7143,6 @@ export const GetUsersActivityDocument = gql`
export const GetVaultsDocument = gql`
query GetVaults {
vaults {
inputTokenBalance
protocol {
network
}
Expand Down Expand Up @@ -7208,7 +7207,6 @@ export const GetVaultsDocument = gql`
export const GetVaultDocument = gql`
query GetVault($id: ID!) {
vault(id: $id) {
inputTokenBalance
protocol {
network
}
Expand Down Expand Up @@ -7273,7 +7271,6 @@ export const GetVaultDocument = gql`
cumulativeDeposits
cumulativeEarnings
cumulativeWithdrawals
inputTokenBalance
inputToken {
id
name
Expand All @@ -7297,7 +7294,6 @@ export const GetVaultDocument = gql`
feePercentage
feeType
}
calculatedApr
createdTimestamp
lastUpdateTimestamp
}
Expand Down

0 comments on commit f492213

Please sign in to comment.