@nevuamarkets/poly-websockets 0.2.1 → 0.2.2

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.
@@ -116,8 +116,9 @@ class GroupSocket {
116
116
  var _a, _b, _c;
117
117
  try {
118
118
  const messageStr = data.toString();
119
+ const normalizedMessageStr = messageStr.trim().toUpperCase();
119
120
  // Handle PONG messages that might be sent to message handler during handler reattachment
120
- if (messageStr === 'PONG') {
121
+ if (normalizedMessageStr === 'PONG') {
121
122
  return;
122
123
  }
123
124
  let events = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevuamarkets/poly-websockets",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Plug-and-play Polymarket WebSocket price alerts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -139,9 +139,10 @@ export class GroupSocket {
139
139
  const handleMessage = async (data: Buffer) => {
140
140
  try {
141
141
  const messageStr = data.toString();
142
+ const normalizedMessageStr = messageStr.trim().toUpperCase();
142
143
 
143
144
  // Handle PONG messages that might be sent to message handler during handler reattachment
144
- if (messageStr === 'PONG') {
145
+ if (normalizedMessageStr === 'PONG') {
145
146
  return;
146
147
  }
147
148