Skip to content

Commit

Permalink
rename utils
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmolchany committed Feb 9, 2022
1 parent 0562052 commit 3b72812
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/party_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const getAllPartyEvents = async (fromBlock: number) => {
return events;
};

export const haveAlertedAboutNewParty = async (
export const getHaveAlertedAboutNewParty = async (
partyAddress: string
): Promise<boolean> => {
const key = getHaveAlertedAboutNewPartyCacheKey(partyAddress);
Expand All @@ -105,7 +105,7 @@ export const setHaveAlertedAboutNewParty = async (partyAddress: string) => {
await setRedisAsync(key, "true");
};

export const haveAlertedAboutPartyHalfway = async (
export const getHaveAlertedAboutPartyHalfway = async (
partyAddress: string
): Promise<boolean> => {
const key = getHaveAlertedAboutPartyHalfwayCacheKey(partyAddress);
Expand Down
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ContributionPartyEvent } from "types";
import { ethersProvider } from "./ethereum";
import {
haveAlertedAboutNewParty,
haveAlertedAboutPartyHalfway,
getHaveAlertedAboutNewParty,
getHaveAlertedAboutPartyHalfway,
setHaveAlertedAboutNewParty,
setHaveAlertedAboutPartyHalfway,
} from "./party_events";
Expand All @@ -22,7 +22,7 @@ export const getShouldAlertAboutNewParty = async (
const { partyAddress, createdBy } = event.party;

// check redis to see if alert has already been sent
const hasSet = await haveAlertedAboutNewParty(partyAddress);
const hasSet = await getHaveAlertedAboutNewParty(partyAddress);
if (hasSet) {
return false;
}
Expand All @@ -45,7 +45,7 @@ export const getShouldAlertAboutPartyHalfWay = async (
const { partyAddress } = party;

// check redis to see if alert has already been sent
const hasSet = await haveAlertedAboutPartyHalfway(partyAddress);
const hasSet = await getHaveAlertedAboutPartyHalfway(partyAddress);
if (hasSet) {
return false;
}
Expand Down

0 comments on commit 3b72812

Please sign in to comment.