From 7a19a358a6188a3e528a5fc558632c8fabffc9d1 Mon Sep 17 00:00:00 2001 From: Deadshot Ryker Date: Tue, 30 Apr 2024 08:54:40 +0300 Subject: [PATCH] fixed typescript issues --- adapters/zerolend/src/index.ts | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/adapters/zerolend/src/index.ts b/adapters/zerolend/src/index.ts index 5e121ad3..2a8b9a89 100644 --- a/adapters/zerolend/src/index.ts +++ b/adapters/zerolend/src/index.ts @@ -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; @@ -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);