From e3efa89765c221d5301d2061cdeac8ef85da89f8 Mon Sep 17 00:00:00 2001 From: Kirill Litvinov Date: Wed, 5 Jun 2024 14:36:42 +0300 Subject: [PATCH] empty balances fix --- package.json | 2 +- src/services/Aggregator/ws/schemas/addressUpdateSchema.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e4fd7016..692b34ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.22.0", + "version": "0.22.1-rc1", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/services/Aggregator/ws/schemas/addressUpdateSchema.ts b/src/services/Aggregator/ws/schemas/addressUpdateSchema.ts index 1e3e8d99..2edde4d8 100644 --- a/src/services/Aggregator/ws/schemas/addressUpdateSchema.ts +++ b/src/services/Aggregator/ws/schemas/addressUpdateSchema.ts @@ -10,7 +10,7 @@ const baseAddressUpdate = baseMessageSchema.extend({ id: z.string(), T: z.literal(MessageType.ADDRESS_UPDATE), S: z.string(), // subscription - uc: z.array(z.enum(['b', 'o'])), // update content + uc: z.array(z.enum(['b', 'o']).nullable()), // update content }); const subOrderSchema = z.object({ @@ -121,7 +121,7 @@ export const fullOrderSchema = z.object({ const updateMessageSchema = baseAddressUpdate.extend({ k: z.literal('u'), // kind of message: "u" - updates - uc: z.array(z.enum(['b', 'o'])), // update content: "o" - orders updates, "b" - balance updates + uc: z.array(z.enum(['b', 'o']).nullable()), // update content: "o" - orders updates, "b" - balance updates b: balancesSchema.optional(), o: z.tuple([fullOrderSchema.or(orderUpdateSchema)]).optional(), });