Skip to content

Commit

Permalink
fix: Type annotation issue queryLiquidationQueueBidPoolsByCollateral #64
Browse files Browse the repository at this point in the history
 (#65)
  • Loading branch information
davidvuong authored Apr 26, 2022
1 parent 6aa2e14 commit df76c7f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ interface Option {
limit: number | undefined;
}

export interface BidPoolsByCollateralResponse {
bid_pools: BidPoolResponse[];
}

export const queryLiquidationQueueBidPoolsByCollateral =
({ lcd, collateral_token, start_after, limit }: Option) =>
async (addressProvider: AddressProvider): Promise<BidPoolResponse[]> => {
async (
addressProvider: AddressProvider,
): Promise<BidPoolsByCollateralResponse> => {
const liquidationContractAddress = addressProvider.liquidationQueue();
const response: BidPoolResponse[] = await lcd.wasm.contractQuery(
const response: BidPoolsByCollateralResponse = await lcd.wasm.contractQuery(
liquidationContractAddress,
{
bid_pools_by_collateral: {
Expand Down

0 comments on commit df76c7f

Please sign in to comment.