@cityofzion/bs-neo-legacy 1.0.1 → 1.0.3

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.
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
12
  if (kind === "m") throw new TypeError("Private method is not writable");
4
13
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -21,14 +30,24 @@ class CryptoCompareEDSNeoLegacy extends blockchain_service_1.CryptoCompareEDS {
21
30
  __classPrivateFieldSet(this, _CryptoCompareEDSNeoLegacy_networkId, networkId, "f");
22
31
  }
23
32
  getTokenPriceHistory(params) {
24
- if (__classPrivateFieldGet(this, _CryptoCompareEDSNeoLegacy_networkId, "f") !== 'mainnet')
25
- throw new Error('Exchange is only available on mainnet');
26
- return super.getTokenPriceHistory(params);
33
+ const _super = Object.create(null, {
34
+ getTokenPriceHistory: { get: () => super.getTokenPriceHistory }
35
+ });
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (__classPrivateFieldGet(this, _CryptoCompareEDSNeoLegacy_networkId, "f") !== 'mainnet')
38
+ throw new Error('Exchange is only available on mainnet');
39
+ return yield _super.getTokenPriceHistory.call(this, params);
40
+ });
27
41
  }
28
42
  getTokenPrices(currency) {
29
- if (__classPrivateFieldGet(this, _CryptoCompareEDSNeoLegacy_networkId, "f") !== 'mainnet')
30
- throw new Error('Exchange is only available on mainnet');
31
- return super.getTokenPrices(currency);
43
+ const _super = Object.create(null, {
44
+ getTokenPrices: { get: () => super.getTokenPrices }
45
+ });
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ if (__classPrivateFieldGet(this, _CryptoCompareEDSNeoLegacy_networkId, "f") !== 'mainnet')
48
+ throw new Error('Exchange is only available on mainnet');
49
+ return yield _super.getTokenPrices.call(this, currency);
50
+ });
32
51
  }
33
52
  }
34
53
  exports.CryptoCompareEDSNeoLegacy = CryptoCompareEDSNeoLegacy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo-legacy",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Coz",