This commit is contained in:
Aleksandr Kraiz
2023-08-21 17:42:08 +04:00
parent 4259c04caf
commit cd1f34bbae
5 changed files with 3193 additions and 1635 deletions

View File

@@ -229,7 +229,7 @@ class AggregatorWS {
this.logger?.(`Sent: ${jsonData}`);
}
private hearbeatIntervalId: NodeJS.Timer | undefined;
private hearbeatIntervalId: ReturnType<typeof setInterval> | undefined;
private setupHeartbeat() {
const heartbeat = () => {
if (this.isAlive) {
@@ -552,7 +552,7 @@ class AggregatorWS {
break;
case MessageType.AGGREGATED_ORDER_BOOK_UPDATE: {
const { ob, S } = json;
const mapOrderbookItems = (rawItems: typeof ob.a | typeof ob.b) => rawItems.reduce<OrderbookItem[]>((acc, item) => {
const mapOrderbookItems = (rawItems: typeof ob.a) => rawItems.reduce<OrderbookItem[]>((acc, item) => {
const [
price,
amount,