Skip to content

Commit

Permalink
lowercase if address (#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparkallas authored Apr 23, 2024
1 parent 46bfa4a commit c108801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/sdk-core/src/subgraph/SubgraphClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class SubgraphClient {
variables: variables ? cleanVariables<V>(variables) : undefined,
// TODO: explicit casting is semi-dirty and not recommended
// but I am not sure how to fix this right now
} as RequestExtendedOptions<V, T>);
} as unknown as RequestExtendedOptions<V, T>);
}
}

Expand Down
5 changes: 4 additions & 1 deletion packages/sdk-core/src/subgraph/subgraphQueryHandler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
import { ethers } from "ethers";
import _ from "lodash";

import { listAllResults } from "../Query";
Expand Down Expand Up @@ -224,7 +225,9 @@ export abstract class SubgraphQueryHandler<

const response = await this.querySubgraph(subgraphClient, {
where: {
id: query.id,
id: ethers.utils.isAddress(query.id)
? query.id.toLowerCase()
: query.id,
},
skip: 0,
take: 1,
Expand Down

0 comments on commit c108801

Please sign in to comment.