@aguycalled/electrum-client-js
Advanced tools
Comparing version 0.1.12 to 0.1.13
{ | ||
"name": "@aguycalled/electrum-client-js", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Electrum protocol client for node.js and browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -32,3 +32,3 @@ const SocketClient = require('../socket/socket_client') | ||
} catch (err) { | ||
throw new Error(`failed to connect to electrum server: [${err}]`) | ||
this.onError(`failed to connect to electrum server: [${err}]`) | ||
} | ||
@@ -35,0 +35,0 @@ |
@@ -36,3 +36,3 @@ 'use strict' | ||
this.self.onClose(event) | ||
reject(new Error(`websocket connection closed: code: [${event.code}], reason: [${event.reason}]`)) | ||
this.self.onError(`websocket connection closed: code: [${event.code}], reason: [${event.reason}]`) | ||
} | ||
@@ -39,0 +39,0 @@ |
@@ -85,2 +85,3 @@ | ||
onConnect() { | ||
this.subscribe.emit('socket.connected') | ||
} | ||
@@ -105,3 +106,3 @@ | ||
onError(error) { | ||
this.subscribe.emit('error', `onError: [${error}]`) | ||
this.subscribe.emit('socket.error', `onError: [${error}]`) | ||
} | ||
@@ -108,0 +109,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29959
778