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

Parse Permit Url #828

Open
wants to merge 8 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions src/handlers/payout/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,12 @@ export const handleIssueClosed = async (
assigneeComment =
`#### ${title} Reward \n### [ **[ CLAIM ${priceInEth} ${tokenSymbol.toUpperCase()} ]** ](${payoutUrl})\n` + "```" + shortenRecipient + "```";
const permitComments = incentivesCalculation.comments.filter((content) => {
const permitUrlMatches = content.body.match(incentivesCalculation.claimUrlRegex);
if (!permitUrlMatches || permitUrlMatches.length < 2) return false;
else return true;
if (content.body.includes("https://pay.ubq.fi") && content.user.type == UserType.Bot) {
const url = new URL(content.body);
Sadaf-A marked this conversation as resolved.
Show resolved Hide resolved
// Check if the URL contains the specific query parameter
return url.searchParams.has("claim");
}
return false;
});

if (permitComments.length > 0) {
Expand Down
Loading