From 4a46287203a7784fe2e39ee54241fada4f31a60d Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Wed, 31 Jan 2024 16:04:54 +0000 Subject: [PATCH] Increase page size when retrieving orders (#5302) --- backend/canisters/market_maker/CHANGELOG.md | 1 + backend/libraries/icdex_client/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/canisters/market_maker/CHANGELOG.md b/backend/canisters/market_maker/CHANGELOG.md index be462a8b6d..c1db06dd63 100644 --- a/backend/canisters/market_maker/CHANGELOG.md +++ b/backend/canisters/market_maker/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Avoid usages of `make_c2c_call` and use macro instead ([#5252](https://github.com/open-chat-labs/open-chat/pull/5252)) - Filter out orders which have 0 amount remaining ([#5301](https://github.com/open-chat-labs/open-chat/pull/5301)) +- Increase page size when retrieving orders ([#5302](https://github.com/open-chat-labs/open-chat/pull/5302)) ## [[2.0.999](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.999-market_maker)] - 2024-01-05 diff --git a/backend/libraries/icdex_client/src/lib.rs b/backend/libraries/icdex_client/src/lib.rs index 10581aaeb9..4e47d1ab42 100644 --- a/backend/libraries/icdex_client/src/lib.rs +++ b/backend/libraries/icdex_client/src/lib.rs @@ -1,3 +1,4 @@ +use candid::Nat; use ic_cdk::api::call::{CallResult, RejectionCode}; use icdex_canister::{ICDexOrderType, MakeOrderResponse, OrderPrice, OrderQuantity, TradingOrder}; use icrc_ledger_types::icrc1::transfer::TransferArg; @@ -49,7 +50,7 @@ impl ICDexClient { } pub async fn my_open_orders(&self) -> CallResult> { - let args = (self.this_canister_id.to_string(), None, None); + let args = (self.this_canister_id.to_string(), None, Some(Nat::from(250u32))); let orders = icdex_canister_c2c_client::pending(self.dex_canister_id, args).await?.0;