carbon-js-sdk 0.3.12 → 0.3.13

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.
@@ -194,7 +194,11 @@ class WSConnector {
194
194
  const channelIds = [];
195
195
  for (const param of params) {
196
196
  const channelId = (0, channel_1.generateChannelId)(param);
197
+ const shouldUnsubscribe = this.channelHandlers[channelId] !== undefined;
197
198
  delete this.channelHandlers[channelId];
199
+ if (shouldUnsubscribe) {
200
+ channelIds.push(channelId);
201
+ }
198
202
  }
199
203
  this.send('unsubscribe', {
200
204
  channels: channelIds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",