Small fix

This commit is contained in:
Aleksandr Kraiz
2022-06-13 13:22:07 +04:00
committed by meafmira
parent bddc719d97
commit 4979d98877
3 changed files with 5 additions and 8 deletions

View File

@@ -86,9 +86,8 @@ type PairsConfigSubscription = {
}
type PairConfigSubscription = {
callback: ({ data }: {
data: AssetPairUpdate,
}) => void,
payload: string,
callback: (data: AssetPairUpdate) => void,
}
type AggregatedOrderbookSubscription = {
@@ -422,9 +421,7 @@ class OrionAggregatorWS {
const pair = json;
const [, minQty, pricePrecision] = pair.u;
this.subscriptions[SubscriptionType.ASSET_PAIR_CONFIG_UPDATES_SUBSCRIBE]?.[json.id]?.callback({
data: { minQty, pricePrecision },
});
this.subscriptions[SubscriptionType.ASSET_PAIR_CONFIG_UPDATES_SUBSCRIBE]?.[json.id]?.callback({ minQty, pricePrecision });
break;
}

View File

@@ -8,7 +8,7 @@ const assetPairConfigSchema = baseMessageSchema.extend({
u: z.tuple([
z.string(), // pairName
z.number(), // minQty
z.number(), // pricePrecision
z.number().int(), // pricePrecision
]),
});

View File

@@ -10,7 +10,7 @@ const assetPairsConfigSchema = baseMessageSchema.extend({
z.tuple([
z.string(), // pairName
z.number(), // minQty
z.number(), // pricePrecision
z.number().int(), // pricePrecision
]),
),
});