@gainsnetwork/sdk 0.1.9 → 0.1.10-rc2

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.
Files changed (32) hide show
  1. package/lib/contracts/utils/pairs.js +2 -2
  2. package/lib/markets/forex.d.ts +1 -1
  3. package/lib/markets/forex.js +7 -1
  4. package/package.json +1 -1
  5. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +0 -979
  6. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.js +0 -2
  7. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +0 -1058
  8. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +0 -2
  9. package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +0 -911
  10. package/lib/contracts/types/generated/GNSPairInfosV6_1.js +0 -2
  11. package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +0 -660
  12. package/lib/contracts/types/generated/GNSPairsStorageV6.js +0 -2
  13. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.d.ts +0 -806
  14. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.js +0 -2
  15. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +0 -821
  16. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +0 -2
  17. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +0 -1838
  18. package/lib/contracts/types/generated/GTokenV6_3_2.js +0 -2
  19. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +0 -88
  20. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +0 -1654
  21. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +0 -113
  22. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +0 -1742
  23. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +0 -98
  24. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +0 -1485
  25. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +0 -117
  26. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +0 -1265
  27. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +0 -82
  28. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +0 -1273
  29. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +0 -82
  30. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +0 -1326
  31. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +0 -110
  32. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +0 -2682
@@ -98,7 +98,7 @@ const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void
98
98
  });
99
99
  exports.fetchOpenInterest = fetchOpenInterest;
100
100
  const getPairDescription = (pairIndex) => {
101
- return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || '';
101
+ return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || "";
102
102
  };
103
103
  exports.getPairDescription = getPairDescription;
104
104
  const PAIR_INDEX_TO_DESCRIPTION = {
@@ -287,7 +287,7 @@ const PAIR_INDEX_TO_DESCRIPTION = {
287
287
  [types_1.PairIndex.ANTUSD]: "Aragon to US Dollar",
288
288
  [types_1.PairIndex.WAVESUSD]: "Waves to US Dollar",
289
289
  [types_1.PairIndex.SKLUSD]: "SKALE to US Dollar",
290
- [types_1.PairIndex.SUPERUSD]: "SuperFarm to US Dollar",
290
+ [types_1.PairIndex.SUPERUSD]: "SuperVerse to US Dollar",
291
291
  [types_1.PairIndex.BALUSD]: "Balancer to US Dollar",
292
292
  [types_1.PairIndex.WTIUSD]: "Oil to US Dollar",
293
293
  [types_1.PairIndex.XPTUSD]: "Platinum to US Dollar",
@@ -1,2 +1,2 @@
1
1
  export declare const isForexOpen: (dateToCheck: Date) => boolean;
2
- export declare const isForexLowLiquidity: (timestampToCheck: number) => boolean;
2
+ export declare const isForexLowLiquidity: (timestampToCheck: number, pairId?: number) => boolean;
@@ -27,11 +27,17 @@ const isForexOpen = (dateToCheck) => {
27
27
  return !isClosed;
28
28
  };
29
29
  exports.isForexOpen = isForexOpen;
30
- const isForexLowLiquidity = (timestampToCheck) => {
30
+ const isForexLowLiquidity = (timestampToCheck, pairId) => {
31
31
  const now = luxon_1.DateTime.fromMillis(timestampToCheck).setZone(FOREX_MARKETS_TIME_ZONE_IANA);
32
32
  const hour = now.hour;
33
33
  const minute = now.minute;
34
34
  const isInDST = now.isInDST;
35
+ // NZD/CHF: increase low liquidity window by additional 30 mins
36
+ if (pairId === 123) {
37
+ return ((isInDST &&
38
+ ((hour == 15 && minute >= 15) || (hour >= 16 && hour < 19))) ||
39
+ (!isInDST && ((hour == 16 && minute >= 15) || (hour >= 17 && hour < 20))));
40
+ }
35
41
  return ((isInDST && ((hour == 15 && minute >= 45) || (hour >= 16 && hour < 19))) ||
36
42
  (!isInDST && ((hour == 16 && minute >= 45) || (hour >= 17 && hour < 20))));
37
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10-rc2",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [