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.
@@ -1447,6 +1447,9 @@ export default class Exchange {
1447
1447
  * @returns {object | undefined}
1448
1448
  */
1449
1449
  const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
1450
+ if (value === undefined) {
1451
+ return defaultValue;
1452
+ }
1450
1453
  if (typeof value === 'object') {
1451
1454
  return value;
1452
1455
  }
@@ -1478,6 +1481,9 @@ export default class Exchange {
1478
1481
  * @returns {Array | undefined}
1479
1482
  */
1480
1483
  const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
1484
+ if (value === undefined) {
1485
+ return defaultValue;
1486
+ }
1481
1487
  if (Array.isArray(value)) {
1482
1488
  return value;
1483
1489
  }
@@ -5277,7 +5283,8 @@ export default class Exchange {
5277
5283
  errors = 0;
5278
5284
  const responseLength = response.length;
5279
5285
  if (this.verbose) {
5280
- const cursorMessage = 'Cursor pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength + ' cursor ' + cursorValue;
5286
+ const iteration = (i + 1).toString();
5287
+ const cursorMessage = 'Cursor pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorValue;
5281
5288
  this.log(cursorMessage);
5282
5289
  }
5283
5290
  if (responseLength === 0) {
@@ -5322,7 +5329,8 @@ export default class Exchange {
5322
5329
  errors = 0;
5323
5330
  const responseLength = response.length;
5324
5331
  if (this.verbose) {
5325
- const incrementalMessage = 'Incremental pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength;
5332
+ const iteration = (i + 1).toString();
5333
+ const incrementalMessage = 'Incremental pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString();
5326
5334
  this.log(incrementalMessage);
5327
5335
  }
5328
5336
  if (responseLength === 0) {
@@ -143,9 +143,12 @@ export default class Client {
143
143
  this.onError(new RequestTimeout('Connection to ' + this.url + ' timed out due to a ping-pong keepalive missing on time'));
144
144
  }
145
145
  else {
146
+ let message;
146
147
  if (this.ping) {
147
- this.send(this.ping(this))
148
- .catch((error) => {
148
+ message = this.ping(this);
149
+ }
150
+ if (message) {
151
+ this.send(message).catch((error) => {
149
152
  this.onError(error);
150
153
  });
151
154
  }