@@ -61,15 +61,15 @@ class WebsocketHandler {
61
61
const fullTx = await transactionUtils . $getTransactionExtended ( tx . txid , true ) ;
62
62
response [ 'tx' ] = fullTx ;
63
63
} catch ( e ) {
64
- logger . debug ( 'Error finding transaction: ' + e . message || e ) ;
64
+ logger . debug ( 'Error finding transaction: ' + ( e instanceof Error ? e . message : e ) ) ;
65
65
}
66
66
}
67
67
} else {
68
68
try {
69
69
const fullTx = await transactionUtils . $getTransactionExtended ( client [ 'track-tx' ] , true ) ;
70
70
response [ 'tx' ] = fullTx ;
71
71
} catch ( e ) {
72
- logger . debug ( 'Error finding transaction. ' + e . message || e ) ;
72
+ logger . debug ( 'Error finding transaction. ' + ( e instanceof Error ? e . message : e ) ) ;
73
73
client [ 'track-mempool-tx' ] = parsedMessage [ 'track-tx' ] ;
74
74
}
75
75
}
@@ -124,7 +124,7 @@ class WebsocketHandler {
124
124
client . send ( JSON . stringify ( response ) ) ;
125
125
}
126
126
} catch ( e ) {
127
- logger . debug ( 'Error parsing websocket message: ' + e . message || e ) ;
127
+ logger . debug ( 'Error parsing websocket message: ' + ( e instanceof Error ? e . message : e ) ) ;
128
128
}
129
129
} ) ;
130
130
} ) ;
@@ -252,7 +252,7 @@ class WebsocketHandler {
252
252
const fullTx = await transactionUtils . $getTransactionExtended ( tx . txid , true ) ;
253
253
response [ 'tx' ] = fullTx ;
254
254
} catch ( e ) {
255
- logger . debug ( 'Error finding transaction in mempool: ' + e . message || e ) ;
255
+ logger . debug ( 'Error finding transaction in mempool: ' + ( e instanceof Error ? e . message : e ) ) ;
256
256
}
257
257
} else {
258
258
response [ 'tx' ] = tx ;
@@ -272,7 +272,7 @@ class WebsocketHandler {
272
272
const fullTx = await transactionUtils . $getTransactionExtended ( tx . txid , true ) ;
273
273
foundTransactions . push ( fullTx ) ;
274
274
} catch ( e ) {
275
- logger . debug ( 'Error finding transaction in mempool: ' + e . message || e ) ;
275
+ logger . debug ( 'Error finding transaction in mempool: ' + ( e instanceof Error ? e . message : e ) ) ;
276
276
}
277
277
} else {
278
278
foundTransactions . push ( tx ) ;
@@ -286,7 +286,7 @@ class WebsocketHandler {
286
286
const fullTx = await transactionUtils . $getTransactionExtended ( tx . txid , true ) ;
287
287
foundTransactions . push ( fullTx ) ;
288
288
} catch ( e ) {
289
- logger . debug ( 'Error finding transaction in mempool: ' + e . message || e ) ;
289
+ logger . debug ( 'Error finding transaction in mempool: ' + ( e instanceof Error ? e . message : e ) ) ;
290
290
}
291
291
} else {
292
292
foundTransactions . push ( tx ) ;
@@ -337,7 +337,7 @@ class WebsocketHandler {
337
337
const fullTx = await transactionUtils . $getTransactionExtended ( rbfTransaction , true ) ;
338
338
response [ 'rbfTransaction' ] = fullTx ;
339
339
} catch ( e ) {
340
- logger . debug ( 'Error finding transaction in mempool: ' + e . message || e ) ;
340
+ logger . debug ( 'Error finding transaction in mempool: ' + ( e instanceof Error ? e . message : e ) ) ;
341
341
}
342
342
} else {
343
343
response [ 'rbfTransaction' ] = rbfTx ;
0 commit comments