Skip to content

Commit 2a006b9

Browse files
fix: parse by_uids API response as direct OrderbookOrder array
1 parent f9219ac commit 2a006b9

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/application/helpers/orderbookClient.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ interface OrderbookOrder {
3939
signature: string;
4040
}
4141

42-
/** Batch endpoint wraps each order in { order: ... }. */
43-
interface BatchOrderResponse {
44-
order: OrderbookOrder;
45-
}
46-
4742
/** Processed composable order stored in cache and returned to callers. */
4843
export interface ComposableOrder {
4944
uid: string;
@@ -303,8 +298,7 @@ async function fetchOrdersByUids(
303298
console.warn(`[COW:OB] Batch fetch ${response.status} uids=${uids.length}`);
304299
return [];
305300
}
306-
const results = (await response.json()) as BatchOrderResponse[];
307-
return results.map((r) => r.order);
301+
return (await response.json()) as OrderbookOrder[];
308302
} catch (err) {
309303
console.warn(`[COW:OB] Batch fetch failed err=${err}`);
310304
return [];

0 commit comments

Comments
 (0)