Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update all non-major dependencies #283

Merged
merged 4 commits into from
Sep 6, 2024
Merged
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
7 changes: 1 addition & 6 deletions apis/path-finder/api/v0/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import { V2_CHAINS, getDataFetcher } from './config'
import { getToken } from './tokens'

const querySchema = z.object({
chainId: z.coerce
.number()
.int()
.gte(0)
.lte(2 ** 256)
.default(ParachainId.ASTAR),
chainId: z.coerce.number().int().gte(0).lte(2 ** 256).default(ParachainId.ASTAR),
fromTokenId: z.string().default('Native'),
toTokenId: z.string().default('Native'),
gasPrice: z.coerce.number().int().gte(1),
Expand Down
3 changes: 2 additions & 1 deletion apis/path-finder/api/v0/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function fetchTokenInfo(chainId: ParachainId, tokenId: string): Promise<To
functionName: 'decimals',
},
],
}).catch((e) => {
})
.catch((e) => {
console.warn(`${e.message}`)
return undefined
})
Expand Down
11 changes: 2 additions & 9 deletions apis/path-finder/api/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ import { MAX_REQUESTS_PER_MIN, convertChainId, getClient, getDataFetcher } from
import { getToken } from './tokens'

const querySchema = z.object({
chainId: z.coerce
.number()
.int()
.gte(0)
.lte(2 ** 256)
.default(ParachainId.ASTAR),
chainId: z.coerce.number().int().gte(0).lte(2 ** 256).default(ParachainId.ASTAR),
fromTokenId: z.string().default('Native'),
toTokenId: z.string().default('Native'),
gasPrice: z.coerce.number().int().gte(1),
Expand Down Expand Up @@ -56,9 +51,7 @@ export default async (request: VercelRequest, response: VercelResponse) => {
response.status(429).send('Too many requests. Please try again later.')
return
}
await redis.multi()
.set(key, Number.parseInt(currentCount, 10) + 1, 'EX', 60)
.exec()
await redis.multi().set(key, Number.parseInt(currentCount, 10) + 1, 'EX', 60).exec()
}

const {
Expand Down
3 changes: 2 additions & 1 deletion apis/path-finder/api/v2/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function fetchTokenInfo(chainId: ParachainId, tokenId: string): Promise<To
functionName: 'decimals',
},
],
}).catch((e) => {
})
.catch((e) => {
console.warn(`${e.message}`)
return undefined
})
Expand Down
6 changes: 3 additions & 3 deletions apis/path-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "TIMING=1 eslint . --fix"
},
"dependencies": {
"@vercel/node": "^3.2.8",
"@vercel/node": "^3.2.11",
"@zenlink-interface/chain": "workspace:*",
"@zenlink-interface/currency": "workspace:*",
"@zenlink-interface/smart-router": "workspace:*",
Expand All @@ -23,14 +23,14 @@
"ethers": "^5.7.2",
"fast-json-stable-stringify": "^2.1.0",
"ioredis": "^5.4.1",
"viem": "2.19.8",
"viem": "2.21.2",
"zod": "^3.23.8"
},
"devDependencies": {
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"dotenv": "^16.4.5",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"ts-node": "^10.9.2",
"typescript": "5.5.4"
}
Expand Down
4 changes: 2 additions & 2 deletions apis/token-price/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lint": "TIMING=1 eslint --fix ."
},
"dependencies": {
"@vercel/node": "^3.2.8",
"@vercel/node": "^3.2.11",
"@zenlink-interface/chain": "workspace:*",
"@zenlink-interface/graph-client": "workspace:*",
"date-fns": "^3.6.0",
Expand All @@ -15,7 +15,7 @@
"devDependencies": {
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"typescript": "5.5.4"
}
}
8 changes: 4 additions & 4 deletions apis/zenlink-stats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
},
"dependencies": {
"@polkadot/api": "^12.3.1",
"@vercel/node": "^3.2.8",
"@vercel/node": "^3.2.11",
"@wagmi/core": "1.1.1-cjs",
"@zenlink-interface/chain": "workspace:*",
"@zenlink-interface/currency": "workspace:*",
"@zenlink-interface/graph-client": "workspace:*",
"@zenlink-interface/smart-router": "workspace:*",
"@zenlink-interface/token-lists": "workspace:*",
"@zenlink-interface/wagmi-config": "workspace:*",
"axios": "^1.6.8",
"axios": "^1.7.7",
"date-fns": "^3.6.0",
"esno": "^4.7.0",
"ethers": "^5.7.2",
"fast-json-stable-stringify": "^2.1.0",
"ioredis": "^5.4.1",
"viem": "2.19.8"
"viem": "2.21.2"
},
"devDependencies": {
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"eslint": "^9.9.0"
"eslint": "^9.9.1"
}
}
24 changes: 12 additions & 12 deletions apps/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@ethersproject/solidity": "^5.7.0",
"@headlessui/react": "2.1.2",
"@heroicons/react": "2.1.5",
"@lingui/core": "4.11.3",
"@lingui/macro": "4.11.3",
"@lingui/react": "4.11.3",
"@lingui/core": "4.11.4",
"@lingui/macro": "4.11.4",
"@lingui/react": "4.11.4",
"@reduxjs/toolkit": "^1.9.7",
"@tanstack/react-query": "^5.52.0",
"@tanstack/react-table": "8.20.1",
"@tanstack/react-query": "^5.54.1",
"@tanstack/react-table": "8.20.5",
"@vercel/analytics": "^1.3.1",
"@zenlink-interface/amm": "workspace:*",
"@zenlink-interface/chain": "workspace:*",
Expand All @@ -49,31 +49,31 @@
"echarts-for-react": "^3.0.2",
"ethers": "^5.7.2",
"fast-json-stable-stringify": "^2.1.0",
"next": "14.2.5",
"next": "14.2.8",
"next-pwa": "^5.6.0",
"next-seo": "^6.5.0",
"next-seo": "^6.6.0",
"next-sitemap": "^4.2.3",
"next-themes": "^0.3.0",
"numeral": "^2.0.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^9.1.2",
"viem": "2.19.8",
"wagmi": "2.12.7",
"viem": "2.21.2",
"wagmi": "2.12.8",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20.16.1",
"@types/node": "^20.16.5",
"@types/numeral": "^2.0.5",
"@types/react": "18.3.4",
"@types/react-dom": "^18.3.0",
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/nextjs-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"graphql": "16.9.0",
"postcss": "^8.4.41",
"postcss": "^8.4.45",
"swr": "^2.2.5",
"tailwindcss": "^3.4.10",
"typescript": "5.5.4"
Expand Down
10 changes: 5 additions & 5 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
"@heroicons/react": "2.1.5",
"@vercel/analytics": "^1.3.1",
"@zenlink-interface/ui": "workspace:*",
"next": "14.2.5",
"next-seo": "^6.5.0",
"next": "14.2.8",
"next-seo": "^6.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^20.16.1",
"@types/node": "^20.16.5",
"@types/react": "18.3.4",
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/nextjs-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"postcss": "^8.4.41",
"eslint": "^9.9.1",
"postcss": "^8.4.45",
"tailwindcss": "^3.4.10",
"typescript": "5.5.4"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export const GaugesTable: FC = () => {
return 0
}
}
})
.slice(fromIndex, toIndex)
}).slice(fromIndex, toIndex)
}, [gauges, communityVotedPercentMap, votedPercentMap, sorting, pagination])

const table = useReactTable<Gauge>({
Expand Down
24 changes: 12 additions & 12 deletions apps/gauge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"dependencies": {
"@headlessui/react": "2.1.2",
"@heroicons/react": "2.1.5",
"@lingui/core": "4.11.3",
"@lingui/macro": "4.11.3",
"@lingui/react": "4.11.3",
"@lingui/core": "4.11.4",
"@lingui/macro": "4.11.4",
"@lingui/react": "4.11.4",
"@reduxjs/toolkit": "^1.9.7",
"@tanstack/react-query": "^5.52.0",
"@tanstack/react-table": "8.20.1",
"@tanstack/react-query": "^5.54.1",
"@tanstack/react-table": "8.20.5",
"@vercel/analytics": "^1.3.1",
"@zenlink-interface/amm": "workspace:*",
"@zenlink-interface/chain": "workspace:*",
Expand All @@ -39,31 +39,31 @@
"echarts": "^5.5.1",
"echarts-for-react": "^3.0.2",
"fast-json-stable-stringify": "^2.1.0",
"next": "14.2.5",
"next": "14.2.8",
"next-pwa": "^5.6.0",
"next-seo": "^6.5.0",
"next-seo": "^6.6.0",
"next-sitemap": "^4.2.3",
"next-themes": "^0.3.0",
"numeral": "^2.0.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-redux": "^9.1.2",
"viem": "2.19.8",
"wagmi": "2.12.7",
"viem": "2.21.2",
"wagmi": "2.12.8",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20.16.1",
"@types/node": "^20.16.5",
"@types/numeral": "^2.0.5",
"@types/react": "18.3.4",
"@types/react-dom": "^18.3.0",
"@zenlink-interface/eslint-config": "workspace:*",
"@zenlink-interface/nextjs-config": "workspace:*",
"@zenlink-interface/typescript-config": "workspace:*",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"eslint": "^9.9.1",
"graphql": "16.9.0",
"postcss": "^8.4.41",
"postcss": "^8.4.45",
"swr": "^2.2.5",
"tailwindcss": "^3.4.10",
"typescript": "5.5.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ export const MarketAddManual: FC<MarketAddManualProps> = ({ market }) => {
? market.SY.previewRedeem(
market.SY.yieldToken,
Amount.fromRawAmount(market.SY, market.priceOf(market.PT).quote(parsedAmount).quotient),
)
.multiply(new Percent(1).subtract(allSyUsedSlippageTolerance))
.toExact()
).multiply(new Percent(1).subtract(allSyUsedSlippageTolerance)).toExact()
: '',
})
}
Expand Down
6 changes: 3 additions & 3 deletions apps/market/components/MarketSection/MarketChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTheme } from 'next-themes'
import { type FC, useCallback, useEffect, useMemo, useState } from 'react'
import type { EChartsOption } from 'echarts-for-react/lib/types'
import resolveConfig from 'tailwindcss/resolveConfig'
import { AppearOnMount, Typography, classNames } from '@zenlink-interface/ui'
import { Typography, classNames } from '@zenlink-interface/ui'
import { Trans } from '@lingui/macro'
import ReactECharts from 'echarts-for-react'
import tailwindConfig from '../../tailwind.config.js'
Expand Down Expand Up @@ -312,7 +312,7 @@ function APYChart({ chartPeriod, market }: ChartProps) {
</div>
{xData.length && (
<Typography className="text-slate-500 hoveredItemName" variant="sm">
<AppearOnMount>{format(new Date(xData[xData.length - 1] * 1000), 'dd MMM yyyy HH:mm')}</AppearOnMount>
{format(new Date(xData[xData.length - 1] * 1000), 'dd MMM yyyy HH:mm')}
</Typography>
)}
</div>
Expand Down Expand Up @@ -477,7 +477,7 @@ function LiquidityAndVolumeChart({ chartType, chartPeriod, market }: ChartProps)
</Typography>
{xData.length && (
<Typography className="text-slate-500 hoveredItemName" variant="sm">
<AppearOnMount>{format(new Date(xData[xData.length - 1] * 1000), 'dd MMM yyyy HH:mm')}</AppearOnMount>
{format(new Date(xData[xData.length - 1] * 1000), 'dd MMM yyyy HH:mm')}
</Typography>
)}
</div>
Expand Down
8 changes: 2 additions & 6 deletions apps/market/components/MarketSection/MarketStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@ export const MarketStats: FC<MarketStatsProps> = ({ market }) => {
const volume1d = useMemo(() => {
const currentHourIndex = Number.parseInt((new Date().getTime() / 3600000).toString(), 10)
const hourStartUnix1d = Number(currentHourIndex - 24) * 3600000
return market?.marketHourData
.filter(hourData => Number(hourData.hourStartUnix) >= hourStartUnix1d)
.reduce((volume, { hourlyVolumeUSD }) => volume + hourlyVolumeUSD, 0)
return market?.marketHourData.filter(hourData => Number(hourData.hourStartUnix) >= hourStartUnix1d).reduce((volume, { hourlyVolumeUSD }) => volume + hourlyVolumeUSD, 0)
}, [market?.marketHourData])

const volume1dChange = useMemo(() => {
const currentHourIndex = Number.parseInt((new Date().getTime() / 3600000).toString(), 10)
const hourStartUnix1d = Number(currentHourIndex - 24) * 3600000
const hourStartUnix2d = Number(currentHourIndex - 48) * 3600000
const volume2d = market?.marketHourData
.filter(hourData => Number(hourData.hourStartUnix) >= hourStartUnix2d && Number(hourData.hourStartUnix) < hourStartUnix1d)
.reduce((volume, { hourlyVolumeUSD }) => volume + hourlyVolumeUSD, 0)
const volume2d = market?.marketHourData.filter(hourData => Number(hourData.hourStartUnix) >= hourStartUnix2d && Number(hourData.hourStartUnix) < hourStartUnix1d).reduce((volume, { hourlyVolumeUSD }) => volume + hourlyVolumeUSD, 0)

return volume1d && volume2d && volume2d > 0
? (volume1d - volume2d) / volume2d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ export const MarketsTable: FC<MarketsTableParams> = ({ markets, isLoading }) =>
}
}
}
})
.slice(fromIndex, toIndex)
}).slice(fromIndex, toIndex)
}, [activeOnly, markets, marketsGraphDataMap, pagination.pageIndex, pagination.pageSize, query, sorting])

const table = useReactTable<Market>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ export const PositionsTable: FC<PositionsTableParams> = ({ positions, isLoading
}
}
}
})
.slice(fromIndex, toIndex)
}).slice(fromIndex, toIndex)
}, [activeOnly, pagination.pageIndex, pagination.pageSize, positions, priceMap, query, sorting])

const table = useReactTable<MarketPosition>({
Expand Down
Loading
Loading