Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
deri-tianyang committed Apr 30, 2024
1 parent 755087a commit ee71b6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adapters/deri/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const getLTokenPositions = async (blockNumber: number): Promise<Position[]> => {
let result: Position[] = [];
while (fetchNext) {
let query = `{
lTokenPositions(where: {blockNumber: ${blockNumber}, first: 5000, skip:${skip}}) {
adjustedLTokenPositions(where: {blockNumber: ${blockNumber}, first: 5000, skip:${skip}}) {
user
bToken
tokenB0
Expand All @@ -69,7 +69,7 @@ const getLTokenPositions = async (blockNumber: number): Promise<Position[]> => {
headers: { "Content-Type": "application/json" },
});
let data = await response.json();
let positions = data.data.lTokenPositions;
let positions = data.data.adjustedLTokenPositions;
for (let i = 0; i < positions.length; i++) {
let position = positions[i];
result.push(position);
Expand All @@ -89,7 +89,7 @@ const getPTokenPositions = async (blockNumber: number): Promise<Position[]> => {
let result: Position[] = [];
while (fetchNext) {
let query = `{
pTokenPositions(where: {blockNumber: ${blockNumber}, first: 5000, skip:${skip}}) {
adjustedPTokenPositions(where: {blockNumber: ${blockNumber}, first: 5000, skip:${skip}}) {
user
bToken
tokenB0
Expand All @@ -104,7 +104,7 @@ const getPTokenPositions = async (blockNumber: number): Promise<Position[]> => {
headers: { "Content-Type": "application/json" },
});
let data = await response.json();
let positions = data.data.pTokenPositions;
let positions = data.data.adjustedPTokenPositions;
for (let i = 0; i < positions.length; i++) {
let position = positions[i];
result.push(position);
Expand Down

0 comments on commit ee71b6f

Please sign in to comment.