-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect return annotation on queryLiquidationQueueBidPoolsByCollateral
#64
Comments
davidvuong
added a commit
to davidvuong/anchor.js
that referenced
this issue
Apr 6, 2022
Similarly, the same problem exists for export interface QueueBidResponse {
idx: string;
collateral_token: string;
premium_slot: number;
bidder: string;
amount: string;
product_snapshot: string;
sum_snapshot: string;
pending_liquidated_collateral: string;
wait_end: number | undefined;
epoch_snapshot: string;
scale_snapshot: string;
}
export declare const queryLiquidationQueueBidByUser: ({ lcd, collateral_token, bidder, start_after, limit }: Option) => (addressProvider: AddressProvider) => Promise<QueueBidResponse[]>; When the actual response is: {
bids: [
{
idx: '1694',
collateral_token: 'terra...',
premium_slot: 30,
bidder: 'terra...',
amount: '24771388',
product_snapshot: '1',
sum_snapshot: '0',
pending_liquidated_collateral: '0',
wait_end: 1649910621,
epoch_snapshot: '0',
scale_snapshot: '0'
}
]
} So the response type should be wrapped. A temporary solution is: const { bids } = (await queryLiquidationQueueBidByUser({
lcd: this.lcd,
collateral_token: collateral,
bidder: wallet.key.accAddress,
start_after: undefined,
limit: PAGINATION_LIMIT,
})(this.addressProvider)) as unknown as { bids: QueueBidResponse[] }; |
cosullivan
pushed a commit
that referenced
this issue
Apr 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently:
The return type of
queryLiquidationQueueBidPoolsByCollateral
should be:Version:
Documentation: https://docs.anchorprotocol.com/smart-contracts/liquidations/liquidation-queue-contract#bidpoolsbycollateralresponse
Example response in documentation:
The text was updated successfully, but these errors were encountered: