Skip to content
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
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
"@types/eventsource": "^1.1.11",
"@types/qs": "^6.9.7",
"ajv": "^8.12.0",
"fastify": "3.29.4"
"fastify": "^4.15.0"
},
"peerDependencies": {
"fastify": "3.29.4"
"fastify": "^4.15.0"
},
"keywords": [
"ethereum",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/utils/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function getFetchOptsSerializer<Fn extends (...args: any) => any, ReqType
return function getFetchOpts(...args: Parameters<Fn>): FetchOpts {
const req = reqSerializer.writeReq(...args);
return {
url: urlFormater(req.params || {}),
url: urlFormater(req.params ?? {}),
method: routeDef.method,
query: req.query,
body: req.body as unknown,
Expand Down
5 changes: 3 additions & 2 deletions packages/api/src/utils/server/genericJsonServer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type {FastifyInstance} from "fastify";
import {mapValues} from "@lodestar/utils";
import {ChainForkConfig} from "@lodestar/config";
import {ReqGeneric, TypeJson, Resolves, RouteGroupDefinition} from "../types.js";
Expand Down Expand Up @@ -39,8 +40,8 @@ export function getGenericJsonServer<
id: routeId as string,
schema: routeSerdes.schema && getFastifySchema(routeSerdes.schema),

handler: async function handler(req: ReqGeneric, resp): Promise<unknown | void> {
const args: any[] = routeSerdes.parseReq(req as ReqTypes[keyof Api]);
handler: async function handler(this: FastifyInstance, req, resp): Promise<unknown | void> {
const args: any[] = routeSerdes.parseReq(req as ReqGeneric as ReqTypes[keyof Api]);
const data = (await api[routeId](...args)) as Resolves<Api[keyof Api]>;

if (routeDef.statusOk !== undefined) {
Expand Down
6 changes: 3 additions & 3 deletions packages/beacon-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
"@chainsafe/ssz": "^0.10.2",
"@chainsafe/threads": "^1.10.0",
"@ethersproject/abi": "^5.7.0",
"@fastify/bearer-auth": "^7.0.0",
"@fastify/cors": "^7.0.0",
"@fastify/bearer-auth": "^9.0.0",
"@fastify/cors": "^8.2.1",
"@libp2p/bootstrap": "^6.0.3",
"@libp2p/interface-connection": "^3.0.2",
"@libp2p/interface-connection-manager": "^1.3.0",
Expand Down Expand Up @@ -138,7 +138,7 @@
"datastore-core": "^8.0.1",
"datastore-level": "^9.0.1",
"deepmerge": "^4.3.1",
"fastify": "3.29.4",
"fastify": "^4.15.0",
"gc-stats": "^1.4.0",
"interface-datastore": "^7.0.0",
"it-all": "^3.0.1",
Expand Down
Loading