Skip to content

Commit

Permalink
Merge pull request #2 from gitcoinco/2708-checking-scroll-badge-eligi…
Browse files Browse the repository at this point in the history
…bility-fails

fix: order the returned attestation desc by time, in order to look at…
  • Loading branch information
nutrina authored Jul 18, 2024
2 parents 6d41708 + 2152c6d commit d1a8937
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,24 @@ export const getAttestations = async (
easScanUrl: string
): Promise<Attestation[]> => {
const query = `
query {
attestations (where: {
attester: { equals: "${attester}" },
recipient: { equals: "${address}", mode: insensitive }
}) {
query {
attestations(
where: {
attester: {
equals: "${attester}"
mode: insensitive
}
recipient: {
equals: "${address}"
mode: insensitive
}
schemaId: {
equals: "${PASSPORT_SCORE_SCHEMA_UID}"
mode: insensitive
}
}
orderBy: [{ timeCreated: desc }]
) {
recipient
revocationTime
revoked
Expand All @@ -169,9 +182,9 @@ export const getAttestations = async (
schema {
id
}
}
}
`;
}
}
`;

let result: EASQueryResponse | undefined = undefined;
try {
Expand Down

0 comments on commit d1a8937

Please sign in to comment.