Skip to content

Commit d254eee

Browse files
committed
Merge branch 'feat/add-oracle-function-check-to-pool-creation' of https://github.com/curvefi/curve-frontend into feat/add-oracle-function-check-to-pool-creation
2 parents bbc07b2 + 8e183fa commit d254eee

File tree

145 files changed

+2249
-2210
lines changed

Some content is hidden

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

145 files changed

+2249
-2210
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CI
22
on: [push]
33
env:
44
DO_NOT_TRACK: 1
5+
VERCEL_ALLOW_NODEJS_24: 1
56
IBM_TELEMETRY_DISABLED: true
67
permissions:
78
contents: read
@@ -13,7 +14,7 @@ jobs:
1314
- uses: actions/checkout@v4
1415
- uses: actions/setup-node@v4
1516
with:
16-
node-version: 22
17+
node-version: 24
1718
cache: yarn
1819
- run: yarn set version stable
1920
- run: yarn install --immutable
@@ -28,7 +29,7 @@ jobs:
2829
- uses: actions/checkout@v4
2930
- uses: actions/setup-node@v4
3031
with:
31-
node-version: 22
32+
node-version: 24
3233
cache: yarn
3334
- run: yarn set version stable
3435
- run: yarn install --immutable
@@ -48,7 +49,7 @@ jobs:
4849
- uses: actions/checkout@v4
4950
- uses: actions/setup-node@v4
5051
with:
51-
node-version: 22
52+
node-version: 24
5253
cache: yarn
5354
- run: yarn set version stable
5455
- run: yarn install --immutable
@@ -76,7 +77,7 @@ jobs:
7677
- uses: actions/checkout@v4
7778
- uses: actions/setup-node@v4
7879
with:
79-
node-version: 22
80+
node-version: 24
8081
cache: yarn
8182
- run: yarn set version stable
8283
- run: yarn install --immutable
@@ -115,7 +116,7 @@ jobs:
115116
- uses: actions/checkout@v4
116117
- uses: actions/setup-node@v4
117118
with:
118-
node-version: 22
119+
node-version: 24
119120
cache: yarn
120121
- run: npm install -g wait-on &
121122

.github/workflows/prices-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup NPM registry in Yarn
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: 22
18+
node-version: 24
1919
cache: yarn
2020
registry-url: 'https://registry.npmjs.org'
2121

.github/workflows/rpc-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: 22
18+
node-version: 24
1919
cache: yarn
2020
- run: yarn set version stable
2121
- run: yarn install --immutable

.github/workflows/storybook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-node@v4
2121
with:
22-
node-version: 22
22+
node-version: 24
2323
cache: yarn
2424

2525
- name: 'Build'

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ src/[domain]/
7373
- React 19 with TypeScript
7474
- TanStack Router for routing
7575
- TanStack Query for data fetching
76-
- Node.js 22 (required)
76+
- Node.js LTS version (required)
7777
- Yarn 4 workspaces
7878

7979
**State & Data:**

apps/main/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"engines": {
7-
"node": "22"
7+
"node": "24"
88
},
99
"scripts": {
1010
"dev": "vite",
@@ -38,7 +38,7 @@
3838
"ui": "*",
3939
"vest": "^5.4.6",
4040
"vite-plugin-svgr": "^4.5.0",
41-
"vite-plugin-vercel": "9.0.8"
41+
"vite-plugin-vercel": "9.1.1"
4242
},
4343
"peerDependencies": {
4444
"@curvefi/api": "*",

apps/main/src/dao/store/createAppSlice.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { produce } from 'immer'
22
import lodash from 'lodash'
3+
import type { Config } from 'wagmi'
34
import type { StoreApi } from 'zustand'
45
import type { State } from '@/dao/store/useStore'
56
import type { CurveApi, Wallet } from '@/dao/types/dao.types'
@@ -15,7 +16,7 @@ export interface AppSlice extends SliceState {
1516
updateGlobalStoreByKey: <T>(key: DefaultStateKeys, value: T) => void
1617

1718
/** Hydrate resets states and refreshes store data from the API */
18-
hydrate(api: CurveApi | undefined, prevApi: CurveApi | undefined, wallet: Wallet | undefined): Promise<void>
19+
hydrate(config: Config, api: CurveApi | undefined, prevApi: CurveApi | undefined, wallet: Wallet | undefined): Promise<void>
1920

2021
setAppStateByActiveKey<T>(sliceKey: SliceKey, key: StateKey, activeKey: string, value: T): void
2122
setAppStateByKey<T>(sliceKey: SliceKey, key: StateKey, value: T): void
@@ -35,7 +36,7 @@ const createAppSlice = (set: StoreApi<State>['setState'], get: StoreApi<State>['
3536
)
3637
},
3738

38-
hydrate: async (api, prevApi, wallet) => {
39+
hydrate: async (config, api, prevApi, wallet) => {
3940
if (!api) return
4041

4142
const isNetworkSwitched = prevApi?.chainId != api.chainId

apps/main/src/dex/components/MonadBannerAlert.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/main/src/dex/components/PageCreatePool/ConfirmModal/CreatePoolButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { styled } from 'styled-components'
2+
import { useConfig } from 'wagmi'
23
import InfoLinkBar from '@/dex/components/PageCreatePool/ConfirmModal/CreateInfoLinkBar'
34
import { useNetworks } from '@/dex/entities/networks'
45
import { curveProps } from '@/dex/lib/utils'
@@ -25,6 +26,7 @@ const CreatePoolButton = ({ disabled, curve }: Props) => {
2526
const poolId = useStore((state) => state.createPool.transactionState.poolId)
2627
const errorMessage = useStore((state) => state.createPool.transactionState.errorMessage)
2728
const { connectState, connect: connectWallet } = useWallet()
29+
const config = useConfig()
2830

2931
return !haveSigner ? (
3032
<StyledButton variant="filled" onClick={() => connectWallet()} loading={isLoading(connectState)}>
@@ -39,7 +41,7 @@ const CreatePoolButton = ({ disabled, curve }: Props) => {
3941
</StyledAlertBox>
4042
)}
4143
{(txStatus === '' || txStatus === 'ERROR') && (
42-
<StyledButton disabled={disabled} variant={'icon-filled'} onClick={() => deployPool(curve)}>
44+
<StyledButton disabled={disabled} variant={'icon-filled'} onClick={() => deployPool(config, curve)}>
4345
{t`Create Pool`}
4446
</StyledButton>
4547
)}

apps/main/src/dex/components/PagePool/Page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect, useMemo, useState } from 'react'
2+
import { useConfig } from 'wagmi'
23
import Transfer from '@/dex/components/PagePool/index'
34
import { ROUTE } from '@/dex/constants'
45
import { useNetworkByChain } from '@/dex/entities/networks'
@@ -30,12 +31,13 @@ export const PagePool = () => {
3031

3132
const poolDataCacheOrApi = useMemo(() => poolData || poolDataCache, [poolData, poolDataCache])
3233

34+
const config = useConfig()
3335
useEffect(() => {
3436
if (!rChainId || !poolId || curveApi?.chainId !== rChainId || !haveAllPools || poolData) return
35-
fetchNewPool(curveApi, poolId)
37+
fetchNewPool(config, curveApi, poolId)
3638
.then((found) => setPoolNotFound(!found))
3739
.catch(() => setPoolNotFound(true))
38-
}, [curveApi, fetchNewPool, haveAllPools, network, poolId, poolData, push, rChainId])
40+
}, [config, curveApi, fetchNewPool, haveAllPools, network, poolId, poolData, push, rChainId])
3941

4042
return !rFormType || network.excludePoolsMapper[poolId ?? ''] || poolNotFound ? (
4143
<ErrorPage title="404" subtitle={t`Pool Not Found`} continueUrl={getPath(props, ROUTE.PAGE_POOLS)} />

0 commit comments

Comments
 (0)