Skip to content

Commit 81c3e65

Browse files
authored
When deleting contract sub, don't delete underlying webhook
Unexpected behavior, we have apis for deleting webhooks Signed-off-by: Firekeeper <0xFirekeeper@gmail.com>
1 parent 3c1de99 commit 81c3e65

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/server/routes/contract/subscriptions/remove-contract-subscription.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { type Static, Type } from "@sinclair/typebox";
22
import type { FastifyInstance } from "fastify";
33
import { StatusCodes } from "http-status-codes";
44
import { deleteContractSubscription } from "../../../../shared/db/contract-subscriptions/delete-contract-subscription";
5-
import { deleteWebhook } from "../../../../shared/db/webhooks/revoke-webhook";
65
import { standardResponseSchema } from "../../../schemas/shared-api-schemas";
76

87
const bodySchema = Type.Object({
@@ -47,9 +46,6 @@ export async function removeContractSubscription(fastify: FastifyInstance) {
4746
const contractSubscription = await deleteContractSubscription(
4847
contractSubscriptionId,
4948
);
50-
if (contractSubscription.webhookId) {
51-
await deleteWebhook(contractSubscription.webhookId);
52-
}
5349

5450
reply.status(StatusCodes.OK).send({
5551
result: {

0 commit comments

Comments
 (0)