mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Agg no id
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.1",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -210,7 +210,9 @@ class OrionAggregatorWS {
|
||||
throw new Error(`Subscription '${type}' already exists. Please unsubscribe first.`);
|
||||
}
|
||||
|
||||
const id = uuidv4();
|
||||
const id = type === 'aobus'
|
||||
? ((subscription as any).payload as string) // TODO: Refactor!!!
|
||||
: uuidv4();
|
||||
const subRequest: Partial<Record<string, unknown>> = {};
|
||||
subRequest.T = type;
|
||||
subRequest.id = id;
|
||||
@@ -413,7 +415,7 @@ class OrionAggregatorWS {
|
||||
}, []);
|
||||
this.subscriptions[
|
||||
SubscriptionType.AGGREGATED_ORDER_BOOK_UPDATES_SUBSCRIBE
|
||||
]?.[json.id]?.callback(
|
||||
]?.[json.S]?.callback(
|
||||
mapOrderbookItems(ob.a),
|
||||
mapOrderbookItems(ob.b),
|
||||
S,
|
||||
|
||||
@@ -13,7 +13,7 @@ export const orderBookItemSchema = z.tuple([
|
||||
]);
|
||||
|
||||
export const orderBookSchema = baseMessageSchema.extend({
|
||||
id: z.string(),
|
||||
// id: z.string(),
|
||||
T: z.literal(MessageType.AGGREGATED_ORDER_BOOK_UPDATE),
|
||||
S: z.string(),
|
||||
ob: z.object({
|
||||
|
||||
Reference in New Issue
Block a user