Skip to content

Commit

Permalink
fix: fetch voltage pair data
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Jul 16, 2024
1 parent f30bda9 commit 15fe6b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/sdk/src/core/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export const voltagePairData = once(async (): Promise<any> => {
query: gql`
query GetPairDayDatas {
pairDayDatas(orderBy: date, orderDirection: desc, where: { reserveUSD_gt: 100 }) {
pairAddress
pair {
id
}
}
}
`
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk/src/methods/v2Pairs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export async function v2Pairs(

const filteredPairAddresses = new Map();

for (const { pairAddress } of pairDayData) {
for (const {
pair: { id: pairAddress }
} of pairDayData) {
if (pairAddresses.has(pairAddress)) {
filteredPairAddresses.set(pairAddress, pairAddresses.get(pairAddress));
}
Expand Down

0 comments on commit 15fe6b0

Please sign in to comment.