Skip to content

Commit

Permalink
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/typescript/frontend/src/lib/utils/allowlist.ts
Original file line number Diff line number Diff line change
@@ -19,6 +19,15 @@ export async function isAllowListed(address: string): Promise<boolean> {
address = `0x${address}`;
}

if (ALLOWLISTER3K_URL !== undefined) {
const condition = await fetch(`${ALLOWLISTER3K_URL}/${address}`)
.then((r) => r.text())
.then((data) => data === "true");
if (condition) {
return true;
}
}

if (GALXE_CAMPAIGN_ID !== undefined) {
const condition = await fetch(GALXE_URL, {
method: "POST",
@@ -47,14 +56,5 @@ export async function isAllowListed(address: string): Promise<boolean> {
}
}

if (ALLOWLISTER3K_URL !== undefined) {
const condition = await fetch(`${ALLOWLISTER3K_URL}/${address}`)
.then((r) => r.text())
.then((data) => data === "true");
if (condition) {
return true;
}
}

return false;
}

0 comments on commit 8bde35b

Please sign in to comment.