Skip to content

Commit 5ddd7d8

Browse files
run biome unsafe lint fix
1 parent 631870f commit 5ddd7d8

File tree

69 files changed

+119
-121
lines changed

Some content is hidden

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

69 files changed

+119
-121
lines changed

src/server/listeners/update-tx-listener.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export const updateTxListener = async (): Promise<void> => {
1212
logger({
1313
service: "server",
1414
level: "info",
15-
message: `Listening for updated transactions`,
15+
message: "Listening for updated transactions",
1616
});
1717

1818
const connection = await knex.client.acquireConnection();
19-
connection.query(`LISTEN updated_transaction_data`);
19+
connection.query("LISTEN updated_transaction_data");
2020

2121
connection.on(
2222
"notification",
@@ -28,7 +28,7 @@ export const updateTxListener = async (): Promise<void> => {
2828
(sub) => sub.requestId === parsedPayload.id,
2929
);
3030

31-
if (index == -1) {
31+
if (index === -1) {
3232
return;
3333
}
3434

@@ -55,7 +55,7 @@ export const updateTxListener = async (): Promise<void> => {
5555
logger({
5656
service: "server",
5757
level: "info",
58-
message: `[updateTxListener] Connection database ended`,
58+
message: "[updateTxListener] Connection database ended",
5959
});
6060

6161
knex.client.releaseConnection(connection);
@@ -64,15 +64,15 @@ export const updateTxListener = async (): Promise<void> => {
6464
logger({
6565
service: "server",
6666
level: "info",
67-
message: `[updateTxListener] Released database connection on end`,
67+
message: "[updateTxListener] Released database connection on end",
6868
});
6969
});
7070

7171
connection.on("error", async (err: any) => {
7272
logger({
7373
service: "server",
7474
level: "error",
75-
message: `[updateTxListener] Database connection error`,
75+
message: "[updateTxListener] Database connection error",
7676
error: err,
7777
});
7878

@@ -82,7 +82,7 @@ export const updateTxListener = async (): Promise<void> => {
8282
logger({
8383
service: "worker",
8484
level: "info",
85-
message: `[updateTxListener] Released database connection on error`,
85+
message: "[updateTxListener] Released database connection on error",
8686
});
8787
});
8888
};

src/server/middleware/auth.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export async function withAuth(server: FastifyInstance) {
123123
}
124124
// Allow this request to proceed.
125125
return;
126-
} else if (error) {
126+
}if (error) {
127127
message = error;
128128
}
129129
} catch (err: any) {
@@ -172,11 +172,10 @@ export const onRequest = async ({
172172
const authWallet = await getAuthWallet();
173173
if (publicKey === (await authWallet.getAddress())) {
174174
return await handleAccessToken(jwt, req, getUser);
175-
} else if (publicKey === THIRDWEB_DASHBOARD_ISSUER) {
175+
}if (publicKey === THIRDWEB_DASHBOARD_ISSUER) {
176176
return await handleDashboardAuth(jwt);
177-
} else {
178-
return await handleKeypairAuth({ jwt, req, publicKey });
179177
}
178+
return await handleKeypairAuth({ jwt, req, publicKey });
180179
}
181180

182181
// Get the public key hash from the `kid` header.
@@ -383,7 +382,7 @@ const handleAccessToken = async (
383382

384383
try {
385384
token = await getAccessToken({ jwt });
386-
} catch (e) {
385+
} catch (_e) {
387386
// Missing or invalid signature. This will occur if the JWT not intended for this auth pattern.
388387
return { isAuthed: false };
389388
}

src/server/middleware/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const isZodError = (err: unknown): boolean => {
5353

5454
export function withErrorHandler(server: FastifyInstance) {
5555
server.setErrorHandler(
56-
(error: string | Error | CustomError | ZodError, request, reply) => {
56+
(error: string | Error | CustomError | ZodError, _request, reply) => {
5757
if (typeof error === "string") {
5858
return reply.status(StatusCodes.INTERNAL_SERVER_ERROR).send({
5959
error: {

src/server/routes/auth/access-tokens/get-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function getAllAccessTokens(fastify: FastifyInstance) {
3434
[StatusCodes.OK]: responseBodySchema,
3535
},
3636
},
37-
handler: async (req, res) => {
37+
handler: async (_req, res) => {
3838
const accessTokens = await getAccessTokens();
3939
res.status(StatusCodes.OK).send({
4040
result: accessTokens.map((token) => ({

src/server/routes/auth/keypair/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function listPublicKeys(fastify: FastifyInstance) {
2828
[StatusCodes.OK]: responseBodySchema,
2929
},
3030
},
31-
handler: async (req, res) => {
31+
handler: async (_req, res) => {
3232
const keypairs = await listKeypairs();
3333

3434
res.status(StatusCodes.OK).send({

src/server/routes/auth/permissions/get-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function getAllPermissions(fastify: FastifyInstance) {
3131
[StatusCodes.OK]: responseBodySchema,
3232
},
3333
},
34-
handler: async (req, res) => {
34+
handler: async (_req, res) => {
3535
const permissions = await prisma.permissions.findMany();
3636
res.status(StatusCodes.OK).send({
3737
result: permissions,

src/server/routes/backend-wallet/get-balance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function getBalance(fastify: FastifyInstance) {
5151
const chainId = await getChainIdFromChain(chain);
5252
const sdk = await getSdk({ chainId });
5353

54-
let balanceData = await sdk.getBalance(walletAddress);
54+
const balanceData = await sdk.getBalance(walletAddress);
5555

5656
reply.status(StatusCodes.OK).send({
5757
result: {

src/server/routes/backend-wallet/simulate-transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export async function simulateTransaction(fastify: FastifyInstance) {
8686

8787
const chainId = await getChainIdFromChain(chain);
8888

89-
let queuedTransaction: QueuedTransaction = {
89+
const queuedTransaction: QueuedTransaction = {
9090
status: "queued",
9191
queueId: randomUUID(),
9292
queuedAt: new Date(),

src/server/routes/chain/get-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function getAllChainData(fastify: FastifyInstance) {
6363
[StatusCodes.OK]: responseSchema,
6464
},
6565
},
66-
handler: async (request, reply) => {
66+
handler: async (_request, reply) => {
6767
const allChains = (await fetchChains()) ?? [];
6868
const config = await getConfig();
6969

src/server/routes/configuration/auth/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getAuthConfiguration(fastify: FastifyInstance) {
2626
[StatusCodes.OK]: responseBodySchema,
2727
},
2828
},
29-
handler: async (req, res) => {
29+
handler: async (_req, res) => {
3030
const config = await getConfig();
3131
res.status(StatusCodes.OK).send({
3232
result: {

0 commit comments

Comments
 (0)