mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-01 18:48:13 +03:00
Bump deps
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
import UnsubscriptionType from './UnsubscriptionType';
|
||||
import type {
|
||||
SwapInfoBase, AssetPairUpdate, OrderbookItem,
|
||||
Balance, Exchange, CFDBalance, FuturesTradeInfo, SwapInfo, AnyJSON,
|
||||
Balance, Exchange, CFDBalance, FuturesTradeInfo, SwapInfo, Json,
|
||||
} from '../../../types';
|
||||
import unsubscriptionDoneSchema from './schemas/unsubscriptionDoneSchema';
|
||||
import assetPairConfigSchema from './schemas/assetPairConfigSchema';
|
||||
@@ -202,7 +202,7 @@ class OrionAggregatorWS {
|
||||
}
|
||||
}
|
||||
|
||||
private send(jsonObject: AnyJSON) {
|
||||
private send(jsonObject: Json) {
|
||||
if (this.ws?.readyState === WebSocket.OPEN) {
|
||||
const jsonData = JSON.stringify(jsonObject);
|
||||
this.ws.send(jsonData);
|
||||
@@ -228,7 +228,7 @@ class OrionAggregatorWS {
|
||||
const id = type === 'aobus'
|
||||
? ((subscription as any).payload as string) // TODO: Refactor!!!
|
||||
: uuidv4();
|
||||
const subRequest: AnyJSON = {};
|
||||
const subRequest: Json = {};
|
||||
subRequest['T'] = type;
|
||||
subRequest['id'] = id;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import priceFeedSubscriptions from './priceFeedSubscriptions';
|
||||
import { tickerInfoSchema, candleSchema } from './schemas';
|
||||
import priceSchema from './schemas/priceSchema';
|
||||
import type { AnyJSON } from '../../../types';
|
||||
import type { Json } from '../../../types';
|
||||
import allTickersSchema from './schemas/allTickersSchema';
|
||||
|
||||
export const subscriptions = {
|
||||
@@ -83,7 +83,7 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
|
||||
this.init();
|
||||
}
|
||||
|
||||
private send(jsonObject: AnyJSON) {
|
||||
private send(jsonObject: Json) {
|
||||
if (this.ws?.readyState === WebSocket.OPEN) {
|
||||
const jsonData = JSON.stringify(jsonObject);
|
||||
this.ws.send(jsonData);
|
||||
|
||||
@@ -294,11 +294,4 @@ export type VerboseOrionUnitConfig = {
|
||||
|
||||
export type KnownEnv = typeof knownEnvs[number];
|
||||
|
||||
export type AnyJSON = string | number | boolean | null | JSONObject | JSONArray;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
interface JSONObject {
|
||||
[x: string]: AnyJSON
|
||||
}
|
||||
|
||||
interface JSONArray extends Array<AnyJSON> {}
|
||||
export type Json = string | number | boolean | null | Json[] | { [key: string]: Json };
|
||||
|
||||
Reference in New Issue
Block a user