Skip to content

Commit

Permalink
fix: remove knock
Browse files Browse the repository at this point in the history
  • Loading branch information
Namaskar-1F64F committed Aug 7, 2024
1 parent ee3387f commit 1fec1ae
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 90 deletions.
3 changes: 0 additions & 3 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ STRAWBERRY_WEBHOOK_URL=
DATABASE_URI=
DATABASE_NAME=
DATABASE_COLLECTION=

# Knock
KNOCK_TOKEN=
1 change: 0 additions & 1 deletion src/actions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const DATABASE_WEBHOOK_URL_SECRET_NAME = "DATABASE_WEBHOOK_URL";
export const DATABASE_URI_SECRET_NAME = "DATABASE_URI";
export const DATABASE_NAME_SECRET_NAME = "DATABASE_NAME";
export const DATABASE_COLLECTION_SECRET_NAME = "DATABASE_COLLECTION";
export const KNOCK_TOKEN_SECRET_NAME = "KNOCK_TOKEN";

export const CLAIM_NODE_OP_ABI = ClaimNodeOpAbi;
export const CLAIM_PROTOCOL_DAO_ABI = ClaimProtocolDaoAbi;
Expand Down
44 changes: 0 additions & 44 deletions src/actions/knock.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/actions/minipool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from "./types";
import { jsonRpcProvider } from "./ethers";
import { WebhookMessageCreateOptions } from "discord.js";
import { decodeBLSKeys, initServices, nodeHexToID } from "./utils";
import { initServices } from "./utils";
import { emitter } from "./emitter";
import { BigNumber } from "ethers";

Expand Down Expand Up @@ -160,7 +160,6 @@ export const minipoolStatusChange = async (context: Context, event: Event) => {
"MinipoolStatusChanged"
);
let message;
let workflowData;
if (statusChangedEvents.length === 0) {
throw new Error("status event not found");
}
Expand Down Expand Up @@ -206,5 +205,5 @@ export const minipoolStatusChange = async (context: Context, event: Event) => {
if (!message) {
throw new Error("message not found");
}
await emitter.emit(message, workflowData);
await emitter.emit(message);
};
33 changes: 0 additions & 33 deletions src/actions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"typescript": "^4.3.5"
},
"dependencies": {
"@knocklabs/node": "^0.6.13",
"@tenderly/actions": "^0.2.0",
"axios": "^1.3.4",
"buffer": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ export const SLACK_STREAMLINED_MINIPOOL_LAUNCH_TEMPLATE = async ({
type: "mrkdwn",
text: `${nodeID} \`hex:${nodeIDHex}\``,
},
},//
},
{
type: "divider",
},
Expand Down
4 changes: 0 additions & 4 deletions src/actions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import { Buffer } from "buffer/"; // note: the slash is important!
import ms from "ms";
import { Context } from "@tenderly/actions";
import { discordClient } from "./discord";
import { knockClient } from "./knock";
import { jsonRpcProvider } from "./ethers";
import {
DATABASE_COLLECTION_SECRET_NAME,
DATABASE_NAME_SECRET_NAME,
DATABASE_URI_SECRET_NAME,
DISCORD_WEBHOOK_URL_SECRET_NAME,
JSON_RPC_URL_SECRET_NAME,
KNOCK_TOKEN_SECRET_NAME,
} from "./constants";
import { databaseClient } from "./database";
import { emitter } from "./emitter";
Expand Down Expand Up @@ -135,8 +133,6 @@ export const initServices = async (context: Context) => {
await context.secrets.get(DATABASE_COLLECTION_SECRET_NAME)
);
emitter.addClient(databaseClient);
knockClient.init(await context.secrets.get(KNOCK_TOKEN_SECRET_NAME));
emitter.addClient(knockClient);
};

export const getOrdinal = (n: number) => {
Expand Down

0 comments on commit 1fec1ae

Please sign in to comment.