Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon committed May 15, 2024
2 parents c80e64e + b588ca4 commit 76d12d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions adapters/secta/src/sdk/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const SUBGRAPH_URLS = {
[CHAINS.LINEA]: {
[PROTOCOLS.SECTA]: {
[AMM_TYPES.SECTAV3]:
"https://api.studio.thegraph.com/query/66239/secta-linea-exchange-v3/version/latest",
// "https://gateway-arbitrum.network.thegraph.com/api/3700f7806f624898da7631bb01f5253f/subgraphs/id/DQz9g5ZRSiprkXXCRwRSTjh6J5gsRMuhr8TymEo1pZe6",
//"https://api.studio.thegraph.com/query/66239/secta-linea-exchange-v3/version/latest",
"https://gateway-arbitrum.network.thegraph.com/api/3700f7806f624898da7631bb01f5253f/subgraphs/id/DQz9g5ZRSiprkXXCRwRSTjh6J5gsRMuhr8TymEo1pZe6",
[AMM_TYPES.SECTAV2]:
"https://api.studio.thegraph.com/query/66239/secta-linea-exchange-v2/version/latest",
// "https://gateway-arbitrum.network.thegraph.com/api/3700f7806f624898da7631bb01f5253f/subgraphs/id/4YKqZQ3pH5wZ3seW2ojc1o5HxoJVYQ6UBdunW8ovJCBz",
//"https://api.studio.thegraph.com/query/66239/secta-linea-exchange-v2/version/latest",
"https://gateway-arbitrum.network.thegraph.com/api/3700f7806f624898da7631bb01f5253f/subgraphs/id/4YKqZQ3pH5wZ3seW2ojc1o5HxoJVYQ6UBdunW8ovJCBz",
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion adapters/syncswap/src/sdk/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createPublicClient, http } from "viem";
import { linea } from "viem/chains"

export const V2_SUBGRAPH_URL = "https://gateway-arbitrum.network.thegraph.com/api/ce0ba3625ebbbd3c4b5a2af394dc8e47/subgraphs/id/3xpZFx5YNWzqemwdtRhyaTXVidKNnjY19XAWoHtvR6Lh"
export const V2_SUBGRAPH_URL = "https://gateway-arbitrum.network.thegraph.com/api/06a21853c18afff683a7ff52c764d434/subgraphs/id/3xpZFx5YNWzqemwdtRhyaTXVidKNnjY19XAWoHtvR6Lh"
export const client = createPublicClient({
chain: linea,
transport: http("https://rpc.linea.build")
Expand Down
6 changes: 5 additions & 1 deletion adapters/syncswap/src/sdk/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export const getV2UserPositionsAtBlock = async (blockNumber: number): Promise<Us
body: JSON.stringify({ query }),
headers: { "Content-Type": "application/json" },
})
const { data: { liquidityPositions } } = await response.json();
const jsonData = await response.json();
const liquidityPositions: V2Position[] = [];
if(jsonData.data.hasOwnProperty('liquidityPositions')) {
liquidityPositions.push(...jsonData.data.liquidityPositions)
}
result.push(...liquidityPositions.map((position: V2Position) => {
const { reserve0, reserve1 } = getV2PositionReserves(position)
return {
Expand Down

0 comments on commit 76d12d8

Please sign in to comment.