@clonegod/ttd-core 2.0.71 → 2.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export declare class WebSocketClient {
21
21
  connect(): void;
22
22
  onMessage(callback: (data: any) => void): void;
23
23
  onOpen(callback: () => void): void;
24
- send(data_obj: string): boolean;
24
+ send(data: string): boolean;
25
25
  disconnect(): void;
26
26
  private handleReconnect;
27
27
  isConnected(): boolean;
@@ -54,9 +54,9 @@ class WebSocketClient {
54
54
  onOpen(callback) {
55
55
  this.onOpenCallback = callback;
56
56
  }
57
- send(data_obj) {
57
+ send(data) {
58
58
  if (this.ws && this.ws.readyState === ws_1.default.OPEN) {
59
- this.ws.send(JSON.stringify(data_obj));
59
+ this.ws.send(data);
60
60
  return true;
61
61
  }
62
62
  else {
@@ -73,7 +73,7 @@ class WebSocketClient {
73
73
  }
74
74
  handleReconnect() {
75
75
  if (this.reconnectAttempts >= this.maxReconnectAttempts) {
76
- (0, dist_1.log_warn)(`Max reconnection attempts (${this.maxReconnectAttempts}) reached`);
76
+ (0, dist_1.log_warn)(`Max reconnection attempts (${this.maxReconnectAttempts}) reached, no more reconnect`);
77
77
  return;
78
78
  }
79
79
  this.reconnectAttempts++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "2.0.71",
3
+ "version": "2.0.73",
4
4
  "description": "Common types and utilities for trading systems - use `npm run push` to publish",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",