Skip to content

Commit

Permalink
Delta/getDEltaOrders/pagination options
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Dec 5, 2024
1 parent 2a0f9ae commit e69c88c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/methods/delta/getDeltaOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ type GetDeltaOrderById = (
) => Promise<OrderFromAPI | null>;

type OrdersFilter = {
/**@description Order.owner to fetch Delta Order for */
/** @description Order.owner to fetch Delta Order for */
userAddress: Address;
/** @description Pagination option, page. Default 1 */
page?: number;
/** @description Pagination option, limit. Default 100 */
limit?: number;
};
type OrderFiltersQuery = OrdersFilter;

Expand Down Expand Up @@ -47,6 +51,8 @@ export const constructGetDeltaOrders = ({
const getDeltaOrders: GetDeltaOrders = async (options, signal) => {
const search = constructSearchString<OrderFiltersQuery>({
userAddress: options.userAddress,
page: options.page,
limit: options.limit,
});

const fetchURL = `${baseUrl}${search}` as const;
Expand Down

0 comments on commit e69c88c

Please sign in to comment.