empty balances fix

This commit is contained in:
Kirill Litvinov
2024-06-05 14:36:42 +03:00
parent 2c89b2ec4c
commit e3efa89765
2 changed files with 3 additions and 3 deletions

View File

@@ -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",

View File

@@ -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(),
});