Skip to content

Commit ffe4e67

Browse files
committed
require process* bools
1 parent 7c73f1a commit ffe4e67

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/server/routes/contract/subscriptions/addContractSubscription.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,18 @@ const bodySchema = Type.Object({
2929
examples: ["https://example.com/webhook"],
3030
}),
3131
),
32-
processEventLogs: Type.Optional(
33-
Type.Boolean({
34-
description: "If true, parse event logs for this contract.",
35-
}),
36-
),
32+
processEventLogs: Type.Boolean({
33+
description: "If true, parse event logs for this contract.",
34+
}),
3735
filterEvents: Type.Optional(
3836
Type.Array(Type.String(), {
3937
description:
4038
"A case-sensitive list of event log names to parse. If empty, parse all event logs.",
4139
}),
4240
),
43-
processTransactionReceipts: Type.Optional(
44-
Type.Boolean({
45-
description: "If true, parse transaction receipts for this contract.",
46-
}),
47-
),
41+
processTransactionReceipts: Type.Boolean({
42+
description: "If true, parse transaction receipts for this contract.",
43+
}),
4844
});
4945

5046
const responseSchema = Type.Object({
@@ -83,9 +79,9 @@ export async function addContractSubscription(fastify: FastifyInstance) {
8379
chain,
8480
contractAddress,
8581
webhookUrl,
86-
processEventLogs = true,
82+
processEventLogs,
8783
filterEvents = [],
88-
processTransactionReceipts = true,
84+
processTransactionReceipts,
8985
} = request.body;
9086

9187
const chainId = await getChainIdFromChain(chain);

0 commit comments

Comments
 (0)