@icgio/icg-exchanges-wrapper 1.14.259 → 1.14.260
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.
|
@@ -128,11 +128,6 @@ const get_exchanges_rates = function (Exchanges, exchange_pair_dict, cb, ws_enab
|
|
|
128
128
|
let Exchange = exchange_instances[Exchange_name]
|
|
129
129
|
let all_pairs = exchange_all_pairs[Exchange_name]
|
|
130
130
|
|
|
131
|
-
// Log how many pairs will be used for this exchange
|
|
132
|
-
if (all_pairs.length > 0 && Exchange.ws_market && ws_enabled) {
|
|
133
|
-
console.log(`[WebSocket Rates] ${Exchange_name}: Creating connection with ${all_pairs.length} pair(s): ${all_pairs.join(', ')}`)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
131
|
if (Exchange.ws_market && ws_enabled) {
|
|
137
132
|
// Check if WebSocket is already opening/opened for this exchange
|
|
138
133
|
const ws_key = Exchange_name
|
|
@@ -159,6 +154,10 @@ const get_exchanges_rates = function (Exchanges, exchange_pair_dict, cb, ws_enab
|
|
|
159
154
|
}
|
|
160
155
|
} else {
|
|
161
156
|
// Create new WebSocket connection
|
|
157
|
+
// Log only when actually creating a new connection
|
|
158
|
+
if (all_pairs.length > 0) {
|
|
159
|
+
console.log(`[WebSocket Rates] ${Exchange_name}: Creating connection with ${all_pairs.length} pair(s): ${all_pairs.join(', ')}`)
|
|
160
|
+
}
|
|
162
161
|
ws_connection_pairs[ws_key] = all_pairs
|
|
163
162
|
ws_promise = new Promise((resolve, reject) => {
|
|
164
163
|
if (!Exchange.ws || !Exchange.ws.market) {
|