diff --git a/src/contracts/services/moneyMarket.ts b/src/contracts/services/moneyMarket.ts index 37fd929..3bd4fe4 100644 --- a/src/contracts/services/moneyMarket.ts +++ b/src/contracts/services/moneyMarket.ts @@ -9,6 +9,7 @@ import { import { BatchQueryParsedResponse, BatchQueryParams, + BatchQueryParsedResponseItem, } from '~/types/contracts/batchQuery/model'; import { sendSecretClientContractQuery$ } from '~/client/services/clientServices'; import { ConfigResponse, GetCollateralResponse, GetMarketsResponse } from '~/types/contracts/moneyMarket/response'; @@ -19,6 +20,7 @@ import { ContractAndPagination, Pagination, ParsedConfigResponse, ParsedGetCollateralResponse, ParsedGetMarketsResponse, ParsedRewardPoolsResponse, + RewardPoolResponse, } from '~/types/contracts/moneyMarket/model'; import { Contract } from '~/types/contracts/shared/index'; import { MinBlockHeightValidationOptions } from '~/types'; @@ -735,10 +737,10 @@ async function batchQueryMoneyMarketPublicLogs({ const parseBatchQueryMoneyMarketRewardPools = ( responses: BatchQueryParsedResponse, ): ParsedRewardPoolsResponse[] => ( - responses.map((response: any) => ({ - debtMarket: response.id, + responses.map((response: BatchQueryParsedResponseItem) => ({ + debtMarket: response.id.toString(), blockHeight: response.blockHeight, - rewardPools: response.response.map((pool: any) => ({ + rewardPools: response.response.map((pool: RewardPoolResponse) => ({ rewardPoolId: pool.id, amount: pool.amount, token: pool.token, diff --git a/src/types/contracts/moneyMarket/model.ts b/src/types/contracts/moneyMarket/model.ts index b647a6a..8e4c068 100644 --- a/src/types/contracts/moneyMarket/model.ts +++ b/src/types/contracts/moneyMarket/model.ts @@ -174,6 +174,15 @@ type RewardPool = { rate: string, } +type RewardPoolResponse = { + id: string, + amount: string, + token: string, + start: string, + end: string, + rate: string, +} + type ParsedRewardPoolsResponse = { debtMarket: string, blockHeight: number, @@ -196,5 +205,6 @@ export type { PublicLog, PaginatedPublicLogs, RewardPool, + RewardPoolResponse, ParsedRewardPoolsResponse, };