mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
empty balances fix
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user