edge-currency-plugins 3.3.0 → 3.3.1
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/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +24 -24
- package/lib/common/utxobased/info/dash.js +1 -1
- package/lib/common/utxobased/info/groestlcoin.js +1 -1
- package/lib/common/utxobased/info/zcoin.js +1 -1
- package/lib/common/utxobased/network/Socket.js +9 -9
- package/lib/common/utxobased/network/nodejsWS.js +2 -2
- package/lib/common/utxobased/network/types.js +5 -0
- package/lib/common/utxobased/network/windowWS.js +2 -2
- package/lib/src/common/utxobased/network/types.d.ts +6 -2
- package/package.json +2 -2
|
@@ -32,7 +32,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
32
32
|
customFeeSettings: ['satPerByte'],
|
|
33
33
|
blockbookServers: [
|
|
34
34
|
'wss://blockbook.firo.org',
|
|
35
|
-
'wss://
|
|
35
|
+
'wss://firo.nownodes.io/wss/%{nowNodesApiKey}'
|
|
36
36
|
],
|
|
37
37
|
enableCustomServers: false
|
|
38
38
|
},
|
|
@@ -153,14 +153,14 @@ const asResponseDefault = (raw) => [
|
|
|
153
153
|
_socketQueue.removeIdFromQueue.call(void 0, socketQueueId)
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
const onSocketClose = () => {
|
|
156
|
+
const onSocketClose = (code) => {
|
|
157
157
|
const errObj =
|
|
158
|
-
trackedError
|
|
159
|
-
?
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
: new Error(
|
|
163
|
-
log.warn(`onSocketClose with server ${uri}: ${errObj.message}`)
|
|
158
|
+
trackedError == null
|
|
159
|
+
? new Error('Socket closed without error')
|
|
160
|
+
: trackedError instanceof Error
|
|
161
|
+
? trackedError
|
|
162
|
+
: new Error(String(trackedError))
|
|
163
|
+
log.warn(`onSocketClose with server ${uri}: ${code} ${errObj.message}`)
|
|
164
164
|
clearTimeout(timer)
|
|
165
165
|
connected = false
|
|
166
166
|
socket = null
|
|
@@ -175,7 +175,7 @@ const asResponseDefault = (raw) => [
|
|
|
175
175
|
try {
|
|
176
176
|
emitter.emit(_SocketEmitter.SocketEvent.CONNECTION_CLOSE, uri, errObj)
|
|
177
177
|
} catch (e) {
|
|
178
|
-
log.error(e
|
|
178
|
+
log.error(String(e))
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -403,7 +403,7 @@ const asResponseDefault = (raw) => [
|
|
|
403
403
|
},
|
|
404
404
|
onMessage: onMessage,
|
|
405
405
|
onError: err => {
|
|
406
|
-
trackedError =
|
|
406
|
+
trackedError = err
|
|
407
407
|
},
|
|
408
408
|
onClose: onSocketClose
|
|
409
409
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export interface InnerSocketCallbacks {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Called when the socket closes.
|
|
4
|
+
* See rfc6455 section 7.4.1 for status codes.
|
|
5
|
+
*/
|
|
6
|
+
onClose: (code: number, reason: string) => void;
|
|
7
|
+
onError: (error?: Event | Error) => void;
|
|
3
8
|
onMessage: (message: string) => void;
|
|
4
|
-
onClose: (error?: Error) => void;
|
|
5
9
|
onOpen: () => void;
|
|
6
10
|
}
|
|
7
11
|
export declare enum ReadyState {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"homepage": "https://edge.app/",
|
|
6
6
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|
|
@@ -120,4 +120,4 @@
|
|
|
120
120
|
"wif": "^2.0.6"
|
|
121
121
|
},
|
|
122
122
|
"react-native": "./lib/react-native.js"
|
|
123
|
-
}
|
|
123
|
+
}
|