Skip to content

Commit

Permalink
fixed typescript issues
Browse files Browse the repository at this point in the history
  • Loading branch information
deadshotryker committed Apr 30, 2024
1 parent 9d7d3e2 commit 7a19a35
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions adapters/zerolend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ import fs from "fs";

interface IResponse {
data: {
userReserves: {
user: {
id: string;
};
currentTotalDebt: string;
currentATokenBalance: string;
reserve: {
underlyingAsset: string;
symbol: string;
name: string;
};
liquidityRate: "0";
}[];
userReserves: IData[];
};
}

interface IData {
user: {
id: string;
};
currentTotalDebt: string;
currentATokenBalance: string;
reserve: {
underlyingAsset: string;
symbol: string;
name: string;
};
liquidityRate: "0";
}

type OutputDataSchemaRow = {
block_number: number;
timestamp: number;
Expand Down Expand Up @@ -76,7 +78,7 @@ export const main = async (

if (batch.data.userReserves.length <= 1) break;

batch.data.userReserves.forEach((data) => {
batch.data.userReserves.forEach((data: IData) => {
const balance =
BigInt(data.currentATokenBalance) - BigInt(data.currentTotalDebt);

Expand Down

0 comments on commit 7a19a35

Please sign in to comment.