Skip to content

Commit dd14632

Browse files
authored
Merge branch 'main' into feat/add-erc4626-token-check-to-pool-creation
2 parents 809fd02 + fa7ad0d commit dd14632

File tree

101 files changed

+1339
-3359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1339
-3359
lines changed

apps/main/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"@hookform/error-message": "^2.0.1",
2323
"@hookform/resolvers": "^5.2.2",
2424
"@supercharge/promise-pool": "^3.2.0",
25-
"@tanstack/react-router": "^1.139.12",
26-
"@tanstack/react-router-devtools": "^1.139.12",
25+
"@tanstack/react-router": "^1.139.14",
26+
"@tanstack/react-router-devtools": "^1.139.14",
2727
"@types/memoizee": "^0.4.12",
2828
"curve-ui-kit": "*",
2929
"echarts": "^6.0.0",
@@ -32,7 +32,7 @@
3232
"fuse.js": "^7.1.0",
3333
"lightweight-charts": "^5.0.9",
3434
"memoizee": "^0.4.17",
35-
"react-hook-form": "7.67.0",
35+
"react-hook-form": "7.68.0",
3636
"recharts": "2.15.4",
3737
"solid-js": "^1.9.10",
3838
"ui": "*",
@@ -66,7 +66,7 @@
6666
"globals": "^16.5.0",
6767
"pinst": "^3.0.0",
6868
"typescript": "*",
69-
"typescript-eslint": "^8.48.0",
69+
"typescript-eslint": "^8.48.1",
7070
"vite": "*"
7171
}
7272
}

apps/main/src/dao/DaoLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { useAutoRefresh } from '@/dao/hooks/useAutoRefresh'
22
import networks, { networksIdMapper } from '@/dao/networks'
33
import type { UrlParams } from '@/dao/types/dao.types'
44
import { Outlet } from '@tanstack/react-router'
5-
import { useConnection } from '@ui-kit/features/connect-wallet'
5+
import { useCurve } from '@ui-kit/features/connect-wallet'
66
import { useParams } from '@ui-kit/hooks/router'
77
import { useRedirectToEth } from '@ui-kit/hooks/useRedirectToEth'
88
import { useGasInfoAndUpdateLib } from '@ui-kit/lib/model/entities/gas-info'
99

1010
export function DaoLayout() {
1111
const { network = 'ethereum' } = useParams<Partial<UrlParams>>()
1212
const chainId = networksIdMapper[network]
13-
const { isHydrated } = useConnection()
13+
const { isHydrated } = useCurve()
1414

1515
useRedirectToEth(networks[chainId], network)
1616
useGasInfoAndUpdateLib({ chainId, networks })

apps/main/src/dao/components/ConnectEthereum.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { getPath, getRestFullPathname } from '@/dao/utils/utilsRouter'
22
import Button from '@ui/Button'
3-
import { isLoading, useConnection } from '@ui-kit/features/connect-wallet'
3+
import { isLoading, useCurve } from '@ui-kit/features/connect-wallet'
44
import { useNavigate } from '@ui-kit/hooks/router'
55
import { t } from '@ui-kit/lib/i18n'
66

77
export const ConnectEthereum = () => {
8-
const { connectState } = useConnection()
8+
const { connectState } = useCurve()
99
const push = useNavigate()
1010
return (
1111
<Button

apps/main/src/dao/components/PageAnalytics/CrvStats/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CONTRACT_CRV } from '@/dao/constants'
55
import { useStatsVecrvQuery } from '@/dao/entities/stats-vecrv'
66
import useStore from '@/dao/store/useStore'
77
import Box from '@ui/Box'
8-
import { useConnection, useWallet } from '@ui-kit/features/connect-wallet'
8+
import { useCurve, useWallet } from '@ui-kit/features/connect-wallet'
99
import { t } from '@ui-kit/lib/i18n'
1010
import { useTokenUsdRate } from '@ui-kit/lib/model/entities/token-usd-rate'
1111
import { Metric } from '@ui-kit/shared/ui/Metric'
@@ -15,7 +15,7 @@ import { Chain } from '@ui-kit/utils/network'
1515
const CrvStats = () => {
1616
const { data: veCrvData, isLoading: statsLoading, isSuccess: statsSuccess } = useStatsVecrvQuery({})
1717
const { provider } = useWallet()
18-
const { curveApi: { chainId } = {} } = useConnection()
18+
const { curveApi: { chainId } = {} } = useCurve()
1919
const veCrvFees = useStore((state) => state.analytics.veCrvFees)
2020
const veCrvHolders = useStore((state) => state.analytics.veCrvHolders)
2121
const { data: crv, isFetching: isLoadingCrv } = useTokenUsdRate({ chainId, tokenAddress: CONTRACT_CRV })

apps/main/src/dao/components/PageGauges/GaugeVoting/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { styled } from 'styled-components'
22
import { WrongNetwork } from '@/dao/components/PageVeCrv/WrongNetwork'
3-
import { ConnectWalletPrompt, isLoading, useConnection, useWallet } from '@ui-kit/features/connect-wallet'
3+
import { ConnectWalletPrompt, isLoading, useCurve, useWallet } from '@ui-kit/features/connect-wallet'
44
import CurrentVotes from './CurrentVotes'
55

66
const GaugeVoting = ({ userAddress }: { userAddress: string | undefined }) => {
7-
const { connectState, curveApi: { chainId } = {} } = useConnection()
7+
const { connectState, curveApi: { chainId } = {} } = useCurve()
88
const { provider, connect } = useWallet()
99

1010
if (!provider)

apps/main/src/dao/components/PageGauges/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from 'react'
22
import { styled } from 'styled-components'
3-
import { useAccount } from 'wagmi'
3+
import { useConnection } from 'wagmi'
44
import Box from '@ui/Box'
55
import { t } from '@ui-kit/lib/i18n'
66
import { TabsSwitcher, type TabOption } from '@ui-kit/shared/ui/TabsSwitcher'
@@ -15,7 +15,7 @@ const tabs: TabOption<Tab>[] = [
1515
]
1616

1717
const Gauges = () => {
18-
const { address: userAddress } = useAccount()
18+
const { address: userAddress } = useConnection()
1919
const [tab, setTab] = useState<Tab>('gaugeList')
2020

2121
return (

apps/main/src/dao/components/PageVeCrv/Page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect } from 'react'
22
import { styled } from 'styled-components'
3-
import { useAccount } from 'wagmi'
3+
import { useConnection } from 'wagmi'
44
import FormCrvLocker from '@/dao/components/PageVeCrv/index'
55
import type { FormType } from '@/dao/components/PageVeCrv/types'
66
import { useLockerVecrvInfo } from '@/dao/entities/locker-vecrv-info'
@@ -11,7 +11,7 @@ import Stack from '@mui/material/Stack'
1111
import Box, { BoxHeader } from '@ui/Box'
1212
import IconButton from '@ui/IconButton'
1313
import Spinner, { SpinnerWrapper } from '@ui/Spinner'
14-
import { isLoading, useConnection } from '@ui-kit/features/connect-wallet'
14+
import { isLoading, useCurve } from '@ui-kit/features/connect-wallet'
1515
import { useParams } from '@ui-kit/hooks/router'
1616
import { t } from '@ui-kit/lib/i18n'
1717
import { SizesAndSpaces } from '@ui-kit/themes/design/1_sizes_spaces'
@@ -21,11 +21,11 @@ const { Spacing } = SizesAndSpaces
2121

2222
export const PageVeCrv = () => {
2323
const { formType: rFormType, network } = useParams<VeCrvUrlParams>()
24-
const { curveApi = null, connectState } = useConnection()
24+
const { curveApi = null, connectState } = useCurve()
2525
const rChainId = networksIdMapper[network]
2626
const isLoadingCurve = isLoading(connectState)
2727

28-
const { address: userAddress } = useAccount()
28+
const { address: userAddress } = useConnection()
2929

3030
const { data: vecrvInfo } = useLockerVecrvInfo({ chainId: curveApi?.chainId, userAddress })
3131
const resetState = useStore((state) => state.lockedCrv.resetState)

apps/main/src/dao/components/PageVeCrv/components/FormLockCreate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Stepper from '@ui/Stepper/Stepper'
1717
import type { Step } from '@ui/Stepper/types'
1818
import TxInfoBar from '@ui/TxInfoBar'
1919
import { formatNumber, scanTxPath } from '@ui/utils'
20-
import { isLoading, notify, useConnection } from '@ui-kit/features/connect-wallet'
20+
import { isLoading, notify, useCurve } from '@ui-kit/features/connect-wallet'
2121
import usePageVisibleInterval from '@ui-kit/hooks/usePageVisibleInterval'
2222
import dayjs from '@ui-kit/lib/dayjs'
2323
import { t } from '@ui-kit/lib/i18n'
@@ -27,7 +27,7 @@ const FormLockCreate = ({ curve, rChainId, rFormType, vecrvInfo }: PageVecrv) =>
2727
const isSubscribed = useRef(false)
2828

2929
const activeKey = useStore((state) => state.lockedCrv.activeKey)
30-
const { connectState } = useConnection()
30+
const { connectState } = useCurve()
3131
const isLoadingCurve = isLoading(connectState)
3232
const formEstGas = useStore((state) => state.lockedCrv.formEstGas[activeKey] ?? DEFAULT_FORM_EST_GAS)
3333
const formStatus = useStore((state) => state.lockedCrv.formStatus)

apps/main/src/dao/components/PageVeCrv/components/FormLockCrv.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Stepper from '@ui/Stepper/Stepper'
1313
import type { Step } from '@ui/Stepper/types'
1414
import TxInfoBar from '@ui/TxInfoBar'
1515
import { scanTxPath } from '@ui/utils'
16-
import { type CurveApi, isLoading, notify, useConnection } from '@ui-kit/features/connect-wallet'
16+
import { type CurveApi, isLoading, notify, useCurve } from '@ui-kit/features/connect-wallet'
1717
import usePageVisibleInterval from '@ui-kit/hooks/usePageVisibleInterval'
1818
import { t } from '@ui-kit/lib/i18n'
1919
import { REFRESH_INTERVAL } from '@ui-kit/lib/model'
@@ -22,7 +22,7 @@ const FormLockCrv = ({ curve, rChainId, rFormType, vecrvInfo }: PageVecrv) => {
2222
const isSubscribed = useRef(false)
2323

2424
const activeKey = useStore((state) => state.lockedCrv.activeKey)
25-
const { connectState } = useConnection()
25+
const { connectState } = useCurve()
2626
const isLoadingCurve = isLoading(connectState)
2727
const formEstGas = useStore((state) => state.lockedCrv.formEstGas[activeKey] ?? DEFAULT_FORM_EST_GAS)
2828
const formStatus = useStore((state) => state.lockedCrv.formStatus)

apps/main/src/dao/components/PageVeCrv/components/FormLockDate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Stepper from '@ui/Stepper/Stepper'
1717
import type { Step } from '@ui/Stepper/types'
1818
import TxInfoBar from '@ui/TxInfoBar'
1919
import { scanTxPath } from '@ui/utils'
20-
import { isLoading, notify, useConnection } from '@ui-kit/features/connect-wallet'
20+
import { isLoading, notify, useCurve } from '@ui-kit/features/connect-wallet'
2121
import usePageVisibleInterval from '@ui-kit/hooks/usePageVisibleInterval'
2222
import dayjs from '@ui-kit/lib/dayjs'
2323
import { t } from '@ui-kit/lib/i18n'
@@ -27,7 +27,7 @@ const FormLockDate = ({ curve, rChainId, rFormType, vecrvInfo }: PageVecrv) => {
2727
const isSubscribed = useRef(false)
2828

2929
const activeKey = useStore((state) => state.lockedCrv.activeKey)
30-
const { connectState } = useConnection()
30+
const { connectState } = useCurve()
3131
const isLoadingCurve = isLoading(connectState)
3232
const formEstGas = useStore((state) => state.lockedCrv.formEstGas[activeKey] ?? DEFAULT_FORM_EST_GAS)
3333
const formStatus = useStore((state) => state.lockedCrv.formStatus)

0 commit comments

Comments
 (0)