Skip to content

Commit 423a5c9

Browse files
committed
fix attestations
1 parent d0431c6 commit 423a5c9

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

packages/data-layer/src/services/AttestationService/AttestationService.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class AttestationService {
1717
query getMintingAttestationIdsByTransactionHash(
1818
$transactionHashes: [String!]!
1919
) {
20-
attestationTxns(filter: { txnHash: { in: $transactionHashes } }) {
20+
attestationTxns(where: { txnHash: { _in: $transactionHashes } }) {
2121
txnHash
2222
attestationUid
2323
attestationChainId
@@ -38,26 +38,25 @@ export class AttestationService {
3838
}
3939

4040
async getAttestationCount({
41-
attestationChainIds
41+
attestationChainIds,
4242
}: {
4343
attestationChainIds: number[];
44-
}) : Promise<number> {
44+
}): Promise<number> {
4545
const query = gql`
46-
query getAttestationCount(
47-
$attestationChainIds: [Int!]!
48-
) {
49-
attestations(filter: {
50-
chainId: { in: $attestationChainIds }
51-
}) {
46+
query getAttestationCount($attestationChainIds: [Int!]!) {
47+
attestations(where: { chainId: { _in: $attestationChainIds } }) {
5248
uid
5349
}
5450
}
5551
`;
5652

57-
const response: { attestations: any[] } =
58-
await request(this.gsIndexerEndpoint, query, {
53+
const response: { attestations: { uid: string }[] } = await request(
54+
this.gsIndexerEndpoint,
55+
query,
56+
{
5957
attestationChainIds,
60-
});
58+
},
59+
);
6160

6261
return response.attestations.length;
6362
}

0 commit comments

Comments
 (0)