ccxt 4.2.85 → 4.2.86

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/js/src/bitbank.js CHANGED
@@ -141,21 +141,23 @@ export default class bitbank extends Exchange {
141
141
  },
142
142
  'precisionMode': TICK_SIZE,
143
143
  'exceptions': {
144
- '20001': AuthenticationError,
145
- '20002': AuthenticationError,
146
- '20003': AuthenticationError,
147
- '20005': AuthenticationError,
148
- '20004': InvalidNonce,
149
- '40020': InvalidOrder,
150
- '40021': InvalidOrder,
151
- '40025': ExchangeError,
152
- '40013': OrderNotFound,
153
- '40014': OrderNotFound,
154
- '50008': PermissionDenied,
155
- '50009': OrderNotFound,
156
- '50010': OrderNotFound,
157
- '60001': InsufficientFunds,
158
- '60005': InvalidOrder,
144
+ 'exact': {
145
+ '20001': AuthenticationError,
146
+ '20002': AuthenticationError,
147
+ '20003': AuthenticationError,
148
+ '20005': AuthenticationError,
149
+ '20004': InvalidNonce,
150
+ '40020': InvalidOrder,
151
+ '40021': InvalidOrder,
152
+ '40025': ExchangeError,
153
+ '40013': OrderNotFound,
154
+ '40014': OrderNotFound,
155
+ '50008': PermissionDenied,
156
+ '50009': OrderNotFound,
157
+ '50010': OrderNotFound,
158
+ '60001': InsufficientFunds,
159
+ '60005': InvalidOrder,
160
+ },
159
161
  },
160
162
  });
161
163
  }
@@ -986,16 +988,10 @@ export default class bitbank extends Exchange {
986
988
  '70009': 'We are currently temporarily restricting orders to be carried out. Please use the limit order.',
987
989
  '70010': 'We are temporarily raising the minimum order quantity as the system load is now rising.',
988
990
  };
989
- const errorClasses = this.exceptions;
990
991
  const code = this.safeString(data, 'code');
991
992
  const message = this.safeString(errorMessages, code, 'Error');
992
- const ErrorClass = this.safeValue(errorClasses, code);
993
- if (ErrorClass !== undefined) {
994
- throw new errorClasses[code](message);
995
- }
996
- else {
997
- throw new ExchangeError(this.id + ' ' + this.json(response));
998
- }
993
+ this.throwExactlyMatchedException(this.exceptions['exact'], code, message);
994
+ throw new ExchangeError(this.id + ' ' + this.json(response));
999
995
  }
1000
996
  return undefined;
1001
997
  }
@@ -211,7 +211,7 @@ export default class coinex extends Exchange {
211
211
  parseLeverage(leverage: any, market?: any): Leverage;
212
212
  handleMarginModeAndParams(methodName: any, params?: {}, defaultValue?: any): any[];
213
213
  nonce(): number;
214
- sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
214
+ sign(path: any, api?: any[], method?: string, params?: {}, headers?: any, body?: any): {
215
215
  url: string;
216
216
  method: string;
217
217
  body: any;