Skip to content

Commit

Permalink
chore: "Time Lock" => "Timelock"
Browse files Browse the repository at this point in the history
that's how openzeppelin spells it everywhere :)
  • Loading branch information
chapati23 committed Aug 6, 2024
1 parent 6156e39 commit 8bfd892
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ export const watchdogNotifier: HttpFunction = async (
for (const parsedEvent of parsedEvents) {
switch (parsedEvent.event.eventName) {
case EventType.ProposalCreated:
assert(parsedEvent.timeLockId, "Time lock ID is missing");
assert(parsedEvent.timelockId, "Timelock ID is missing");

await sendDiscordNotification(
parsedEvent.event,
parsedEvent.timeLockId,
parsedEvent.timelockId,
parsedEvent.txHash,
);

await sendTelegramNotification(
parsedEvent.event,
parsedEvent.timeLockId,
parsedEvent.timelockId,
parsedEvent.txHash,
);

Expand Down
6 changes: 3 additions & 3 deletions src/parse-transaction-receipts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import GovernorABI from "./governor-abi.js";
import SortedOraclesABI from "./sorted-oracles-abi.js";
import { EventType, HealthCheckEvent, ProposalCreatedEvent } from "./types.js";
import getEventByTopic from "./utils/get-event-by-topic.js";
import getProposalTimeLockId from "./utils/get-time-lock-id.js";
import getProposaltimelockId from "./utils/get-time-lock-id.js";
import hasLogs from "./utils/has-logs.js";
import isHealthCheckEvent from "./utils/is-health-check-event.js";
import isProposalCreatedEvent from "./utils/is-proposal-created-event.js";
Expand All @@ -22,7 +22,7 @@ export default function parseTransactionReceipts(
): {
block?: number;
event: ProposalCreatedEvent | HealthCheckEvent;
timeLockId?: string;
timelockId?: string;
txHash: string;
}[] {
const result = [];
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function parseTransactionReceipts(

result.push({
event,
timeLockId: getProposalTimeLockId(event),
timelockId: getProposaltimelockId(event),
txHash: log.transactionHash,
});
break;
Expand Down
6 changes: 3 additions & 3 deletions src/send-discord-notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ProposalCreatedEvent } from "./types";

export default async function sendDiscordNotification(
event: ProposalCreatedEvent,
timeLockId: string,
timelockId: string,
txHash: string,
) {
const { title, description } = JSON.parse(event.args.description) as {
Expand All @@ -30,8 +30,8 @@ export default async function sendDiscordNotification(
value: `https://celoscan.io/tx/${txHash}`,
})
.addFields({
name: "Time Lock ID",
value: timeLockId,
name: "Timelock ID",
value: timelockId,
})
.setColor(0xa6e5f6);

Expand Down
4 changes: 2 additions & 2 deletions src/send-telegram-notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProposalCreatedEvent } from "./types";

export default async function sendTelegramNotification(
event: ProposalCreatedEvent,
timeLockId: string,
timelockId: string,
txHash: string,
) {
const botToken = await getSecret(config.TELEGRAM_BOT_TOKEN_SECRET_ID);
Expand All @@ -20,7 +20,7 @@ export default async function sendTelegramNotification(
Proposer: `https://celoscan.io/address/${event.args.proposer}`,
Event: event.eventName,
Transaction: `https://celoscan.io/tx/${txHash}`,
"Time Lock ID": timeLockId,
"Timelock ID": timelockId,
Description: description,
};

Expand Down

0 comments on commit 8bfd892

Please sign in to comment.