ccxt 4.2.34 → 4.2.36

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/dist/cjs/ccxt.js CHANGED
@@ -176,7 +176,7 @@ var woo$1 = require('./src/pro/woo.js');
176
176
 
177
177
  //-----------------------------------------------------------------------------
178
178
  // this is updated by vss.js when building
179
- const version = '4.2.34';
179
+ const version = '4.2.36';
180
180
  Exchange["default"].ccxtVersion = version;
181
181
  const exchanges = {
182
182
  'ace': ace,
@@ -1451,6 +1451,9 @@ class Exchange {
1451
1451
  * @returns {object | undefined}
1452
1452
  */
1453
1453
  const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
1454
+ if (value === undefined) {
1455
+ return defaultValue;
1456
+ }
1454
1457
  if (typeof value === 'object') {
1455
1458
  return value;
1456
1459
  }
@@ -1482,6 +1485,9 @@ class Exchange {
1482
1485
  * @returns {Array | undefined}
1483
1486
  */
1484
1487
  const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
1488
+ if (value === undefined) {
1489
+ return defaultValue;
1490
+ }
1485
1491
  if (Array.isArray(value)) {
1486
1492
  return value;
1487
1493
  }
@@ -5281,7 +5287,8 @@ class Exchange {
5281
5287
  errors = 0;
5282
5288
  const responseLength = response.length;
5283
5289
  if (this.verbose) {
5284
- const cursorMessage = 'Cursor pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength + ' cursor ' + cursorValue;
5290
+ const iteration = (i + 1).toString();
5291
+ const cursorMessage = 'Cursor pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorValue;
5285
5292
  this.log(cursorMessage);
5286
5293
  }
5287
5294
  if (responseLength === 0) {
@@ -5326,7 +5333,8 @@ class Exchange {
5326
5333
  errors = 0;
5327
5334
  const responseLength = response.length;
5328
5335
  if (this.verbose) {
5329
- const incrementalMessage = 'Incremental pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength;
5336
+ const iteration = (i + 1).toString();
5337
+ const incrementalMessage = 'Incremental pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString();
5330
5338
  this.log(incrementalMessage);
5331
5339
  }
5332
5340
  if (responseLength === 0) {
@@ -144,9 +144,12 @@ class Client {
144
144
  this.onError(new errors.RequestTimeout('Connection to ' + this.url + ' timed out due to a ping-pong keepalive missing on time'));
145
145
  }
146
146
  else {
147
+ let message;
147
148
  if (this.ping) {
148
- this.send(this.ping(this))
149
- .catch((error) => {
149
+ message = this.ping(this);
150
+ }
151
+ if (message) {
152
+ this.send(message).catch((error) => {
150
153
  this.onError(error);
151
154
  });
152
155
  }