Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Parse Permit Url #738

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/handlers/payout/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ export const handleIssueClosed = async () => {
logger.info(`Posting a payout url to the issue, url: ${payoutUrl}`);
const comment =
`#### Task Assignee Reward\n### [ **[ CLAIM ${priceInEth} ${tokenSymbol.toUpperCase()} ]** ](${payoutUrl})\n` + "```" + shortenRecipient + "```";
const permitComments = comments.filter((content) => content.body.includes("https://pay.ubq.fi?claim=") && content.user.type == UserType.Bot);
const permitComments = comments.filter((content) => {
0xcodercrane marked this conversation as resolved.
Show resolved Hide resolved
claimUrlRegex;
const permitUrlMatches = content.body.match(claimUrlRegex);
if (!permitUrlMatches || permitUrlMatches.length < 2) return false;
else return true;
});
if (permitComments.length > 0) {
logger.info(`Skip to generate a permit url because it has been already posted.`);
return `Permit generation disabled because it was already posted to this issue.`;
Expand Down
Loading