Skip to content

Commit 2f5cef6

Browse files
committed
Merge branch 'main' into legal/disclaimer-update
2 parents fd100f7 + 8dc6398 commit 2f5cef6

File tree

948 files changed

+28420
-19524
lines changed

Some content is hidden

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

948 files changed

+28420
-19524
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 3 deletions
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:**
@@ -106,7 +106,6 @@ Routes are defined in `/apps/main/src/routes/` with a hierarchical structure:
106106
// Root route with global layout
107107
export const rootRoute = createRootRoute({
108108
component: RootLayout,
109-
loader: getNetworkDefs,
110109
})
111110

112111
// Domain layout route
@@ -119,7 +118,7 @@ export const dexLayoutRoute = createRoute({
119118
// Feature route
120119
export const poolRoute = createRoute({
121120
getParentRoute: () => dexLayoutRoute,
122-
path: '$network/pool/$poolId',
121+
path: '$network/pool/$poolIdOrAddress',
123122
component: PagePool,
124123
head: () => ({ meta: [{ title: 'Pool - Curve' }] }),
125124
})

.github/workflows/ci.yaml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ jobs:
5959
ELECTRON_ENABLE_LOGGING: true # send console logs to stdout in electron browser
6060
NODE_ENV: test
6161

62+
- uses: actions/upload-artifact@v4
63+
if: failure()
64+
with:
65+
name: cypress-component-${{ matrix.browser }}-${{ matrix.count }}
66+
path: tests/cypress/screenshots
67+
retention-days: 3
68+
if-no-files-found: error
69+
6270
cypress-component-rpc:
6371
name: Cypress component tests with RPC
6472
if: github.ref_name == 'main'
@@ -88,6 +96,8 @@ jobs:
8896
with:
8997
name: cypress-rpc
9098
path: tests/cypress/screenshots
99+
retention-days: 3
100+
if-no-files-found: error
91101

92102
cypress-e2e:
93103
strategy:
@@ -98,7 +108,7 @@ jobs:
98108
include:
99109
- browser: chrome
100110
count: 2
101-
name: Cypress in ${{ matrix.browser }} ${{ matrix.count }}
111+
name: Cypress e2e tests in ${{ matrix.browser }} ${{ matrix.count }}
102112
timeout-minutes: 15
103113
runs-on: ubuntu-latest
104114
steps:
@@ -114,26 +124,39 @@ jobs:
114124
- run: yarn build
115125

116126
- name: Start dev server
117-
run: yarn start 2>&1 | tee dev-server.log &
127+
run: yarn start 2>&1 | tee ../../e2e-dev-${{ matrix.browser }}-${{ matrix.count }}.log &
118128
working-directory: apps/main
119129

120-
- run: yarn run cy:run:e2e --browser ${{ matrix.browser }}
130+
- name: Start api server
131+
run: yarn dev 2>&1 | tee ../../e2e-api-${{ matrix.browser }}-${{ matrix.count }}.log &
132+
working-directory: apps/router-api
133+
134+
- name: e2e tests
121135
working-directory: tests
136+
run: |
137+
set -o pipefail # fail tee if the main command fails
138+
yarn run cy:run:e2e --browser ${{ matrix.browser }} 2>&1 | tee ../e2e-cypress-${{ matrix.browser }}-${{ matrix.count }}.log
122139
env:
123140
ELECTRON_ENABLE_LOGGING: true # send console logs to stdout in electron browser
124141
NODE_ENV: test
142+
CYPRESS_VIDEO: ${{ matrix.browser == 'firefox' && 'false' || 'true' }} # Firefox doesn't support recording
143+
144+
- name: Check runtime errors
145+
if: always()
146+
# todo: add `Cannot destructure .. as it is undefined`
147+
run: if grep --ignore-case --extended-regexp "update depth exceeded|many re-renders|unmounted component|non-unique keys|uncontrolled to controlled|properties of undefined" e2e-*.log; then exit 1; fi
125148

126149
- uses: actions/upload-artifact@v4
127150
if: failure()
128151
with:
129-
name: cypress-main-${{ matrix.browser }}-${{ matrix.count }}
152+
name: cypress-e2e-${{ matrix.browser }}-${{ matrix.count }}
130153
path: tests/cypress/screenshots
131-
retention-days: 1
154+
retention-days: 3
132155
if-no-files-found: error
133156

134157
- uses: actions/upload-artifact@v4
135158
if: failure()
136159
with:
137160
name: dev-server-log-${{ matrix.browser }}-${{ matrix.count }}
138161
if-no-files-found: error
139-
path: apps/main/dev-server.log
162+
path: e2e-*.log

.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: 22
1919
cache: yarn
2020
registry-url: 'https://registry.npmjs.org'
2121

.gitignore

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ node_modules
1717
coverage
1818
cypress.env.json
1919
tests/cypress/screenshots
20+
artifacts/
2021

21-
# next.js
22-
.next/
23-
out/
24-
build
22+
# Vercel deployment files, generated by vite-plugin-vercel
23+
/apps/main/.vercel/
2524

2625
# misc
2726
.DS_Store
@@ -58,9 +57,6 @@ dist
5857
# crash report
5958
report.*.json
6059

61-
# hardhat
62-
tests/cache
63-
6460
# storybook
6561
storybook-static
6662
*storybook.log

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ Routes are defined in `/apps/main/src/routes/` with a hierarchical structure:
106106
// Root route with global layout
107107
export const rootRoute = createRootRoute({
108108
component: RootLayout,
109-
loader: getNetworkDefs,
110109
})
111110

112111
// Domain layout route
@@ -119,7 +118,7 @@ export const dexLayoutRoute = createRoute({
119118
// Feature route
120119
export const poolRoute = createRoute({
121120
getParentRoute: () => dexLayoutRoute,
122-
path: '$network/pool/$poolId',
121+
path: '$network/pool/$poolIdOrAddress',
123122
component: PagePool,
124123
head: () => ({ meta: [{ title: 'Pool - Curve' }] }),
125124
})

DEVELOPMENT_GUIDE.md

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

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ This repository is organized as follows:
4444
- `/packages/prices-api`: Package for consuming the Prices API, mapped as `@curvefi/prices-api`. Soon to be to separated its own NPM package.
4545
- `/tests`: Cypress tests
4646

47-
## Development Guide
48-
49-
For detailed information on development practices and usage of new libraries, please refer to our [Development Guide](./DEVELOPMENT_GUIDE.md).
50-
5147
## Testing
5248

5349
Check the [README](./tests/README.md) in the `tests` directory for instructions on how to run end-to-end tests using Cypress.

SECURITY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Security Policy
2+
3+
This document reflects the security contact details published in [https://www.curve.finance/.well-known/security.txt](https://www.curve.finance/.well-known/security.txt).
4+
5+
## Reporting a Vulnerability
6+
7+
- Contact: [security@curve.finance](mailto:security@curve.finance)
8+
- Preferred language: English (`en`)

apps/main/_api/router.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { type IncomingMessage, ServerResponse } from 'http'
2+
import { createRouterApiServer } from 'router-api/src/server'
3+
4+
const server = createRouterApiServer()
5+
6+
/**
7+
* Vercel handler for API routes, using fastify under the hood. This is only used when deployed to Vercel.
8+
* While in development, vite's dev server redirects /api/* calls to the router-api dev server.
9+
* This file is automatically detected by vite-plugin-vercel because it is in the "_api" folder.
10+
*/
11+
export default async function handler(request: IncomingMessage, response: ServerResponse) {
12+
const start = Date.now()
13+
await server.ready()
14+
server.server.emit('request', request, response)
15+
response.on('finish', () =>
16+
server.log.info({
17+
message: 'request finished',
18+
method: request.method,
19+
path: request.url,
20+
runtimeMs: Date.now() - start,
21+
}),
22+
)
23+
}

apps/main/package.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,31 @@
1717
"postpublish": "pinst --enable"
1818
},
1919
"dependencies": {
20-
"@curvefi/api": "2.68.10",
21-
"@curvefi/llamalend-api": "1.0.33",
20+
"@curvefi/llamalend-api": "1.0.40",
2221
"@ethersproject/abi": "^5.8.0",
2322
"@hookform/error-message": "^2.0.1",
24-
"@hookform/resolvers": "^5.2.1",
23+
"@hookform/resolvers": "^5.2.2",
2524
"@supercharge/promise-pool": "^3.2.0",
26-
"@tanstack/react-router": "^1.131.31",
27-
"@tanstack/react-router-devtools": "^1.131.31",
25+
"@tanstack/react-router": "^1.139.14",
26+
"@tanstack/react-router-devtools": "^1.139.14",
2827
"@types/memoizee": "^0.4.12",
2928
"curve-ui-kit": "*",
29+
"echarts": "^6.0.0",
30+
"echarts-for-react": "^3.0.5",
3031
"external-rewards": "*",
3132
"fuse.js": "^7.1.0",
32-
"lightweight-charts": "^5.0.8",
33+
"lightweight-charts": "^5.0.9",
3334
"memoizee": "^0.4.17",
34-
"react-hook-form": "7.62.0",
35+
"react-hook-form": "7.68.0",
3536
"recharts": "2.15.4",
37+
"solid-js": "^1.9.10",
3638
"ui": "*",
3739
"vest": "^5.4.6",
3840
"vite-plugin-svgr": "^4.5.0",
39-
"vite-plugin-vercel": "9.0.7"
41+
"vite-plugin-vercel": "9.0.8"
4042
},
4143
"peerDependencies": {
44+
"@curvefi/api": "*",
4245
"bignumber.js": "*",
4346
"ethers": "*",
4447
"immer": "*",
@@ -49,20 +52,21 @@
4952
"zustand": "*"
5053
},
5154
"devDependencies": {
55+
"@curvefi/api": "*",
5256
"@eslint/js": "*",
53-
"@types/lodash": "^4.17.20",
57+
"@types/lodash": "^4.17.21",
5458
"@types/memoizee": "^0.4.12",
55-
"@types/node": "24.3.0",
59+
"@types/node": "*",
5660
"@types/react": "*",
5761
"@types/react-dom": "*",
58-
"@vitejs/plugin-react": "^5.0.1",
62+
"@vitejs/plugin-react": "*",
5963
"babel-plugin-styled-components": "^2.1.4",
6064
"eslint": "*",
6165
"eslint-config-custom": "*",
62-
"globals": "^16.3.0",
66+
"globals": "^16.5.0",
6367
"pinst": "^3.0.0",
6468
"typescript": "*",
65-
"typescript-eslint": "^8.41.0",
69+
"typescript-eslint": "^8.48.1",
6670
"vite": "*"
6771
}
6872
}

0 commit comments

Comments
 (0)