@nightlylabs/dex-sdk 0.3.40 → 0.3.41

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.
package/dist/index.cjs CHANGED
@@ -24520,12 +24520,12 @@ var Client = class _Client {
24520
24520
  } else {
24521
24521
  data = msg.data;
24522
24522
  }
24523
+ const decodedMsg = JSON.parse(data);
24524
+ this._wsLog("Received:", decodedMsg.type, decodedMsg.content);
24523
24525
  if (data === '{"type":"Pong"}') {
24524
24526
  this._lastPongAt = Date.now();
24525
24527
  return;
24526
24528
  }
24527
- const decodedMsg = JSON.parse(data);
24528
- this._wsLog("Received:", decodedMsg.type, decodedMsg.content);
24529
24529
  const topic = getTopicFromMessage(decodedMsg);
24530
24530
  const callback = this._subscriptions.get(topic);
24531
24531
  if (callback) {
@@ -24574,7 +24574,13 @@ var Client = class _Client {
24574
24574
  }
24575
24575
  const pongTimeout = this._pingIntervalMs * 2;
24576
24576
  const alive = Date.now() - this._lastPongAt < pongTimeout;
24577
- this._wsLog("isWebSocketConnected:", alive, "lastPong:", Date.now() - this._lastPongAt, "ms ago");
24577
+ this._wsLog(
24578
+ "isWebSocketConnected:",
24579
+ alive,
24580
+ "lastPong:",
24581
+ Date.now() - this._lastPongAt,
24582
+ "ms ago"
24583
+ );
24578
24584
  return alive;
24579
24585
  }
24580
24586
  sendWsMessage(message) {
package/dist/index.js CHANGED
@@ -24478,12 +24478,12 @@ var Client = class _Client {
24478
24478
  } else {
24479
24479
  data = msg.data;
24480
24480
  }
24481
+ const decodedMsg = JSON.parse(data);
24482
+ this._wsLog("Received:", decodedMsg.type, decodedMsg.content);
24481
24483
  if (data === '{"type":"Pong"}') {
24482
24484
  this._lastPongAt = Date.now();
24483
24485
  return;
24484
24486
  }
24485
- const decodedMsg = JSON.parse(data);
24486
- this._wsLog("Received:", decodedMsg.type, decodedMsg.content);
24487
24487
  const topic = getTopicFromMessage(decodedMsg);
24488
24488
  const callback = this._subscriptions.get(topic);
24489
24489
  if (callback) {
@@ -24532,7 +24532,13 @@ var Client = class _Client {
24532
24532
  }
24533
24533
  const pongTimeout = this._pingIntervalMs * 2;
24534
24534
  const alive = Date.now() - this._lastPongAt < pongTimeout;
24535
- this._wsLog("isWebSocketConnected:", alive, "lastPong:", Date.now() - this._lastPongAt, "ms ago");
24535
+ this._wsLog(
24536
+ "isWebSocketConnected:",
24537
+ alive,
24538
+ "lastPong:",
24539
+ Date.now() - this._lastPongAt,
24540
+ "ms ago"
24541
+ );
24536
24542
  return alive;
24537
24543
  }
24538
24544
  sendWsMessage(message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nightlylabs/dex-sdk",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {