@fileverse-dev/formulajs 4.4.11-mod-68-patch-8 → 4.4.11-mod-68-patch-9

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,4 @@
1
- /* @fileverse-dev/formulajs v4.4.11-mod-68-patch-8 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-68-patch-9 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -11139,8 +11139,7 @@ function _typeof(o) {
11139
11139
  return {
11140
11140
  URL: url,
11141
11141
  HEADERS: _objectSpread(_objectSpread({}, headers), {}, {
11142
- method: "GET",
11143
- "Content-Type": "application/json"
11142
+ method: "GET"
11144
11143
  })
11145
11144
  };
11146
11145
  }
@@ -17481,7 +17480,7 @@ function _typeof(o) {
17481
17480
  }
17482
17481
  function _COINGECKO() {
17483
17482
  _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee19() {
17484
- var _category$toLowerCase, _argsToArray17, _argsToArray18, category, param1, param2, apiKey, headers, url, vs, map, _category, trend, _category2, _trend, res, json, _json$status, msg, out, _i13, _Object$entries4, _Object$entries4$_i, token, prices, _i14, _Object$entries5, _Object$entries5$_i, cur, val, _data4, _args19 = arguments;
17483
+ var _category$toLowerCase, _argsToArray17, _argsToArray18, category, param1, param2, apiKey, headers, url, vs, map, _category, trend, _category2, _trend, _getUrlAndHeaders8, finalUrl, HEADERS, res, json, _json$status, msg, out, _i13, _Object$entries4, _Object$entries4$_i, token, prices, _i14, _Object$entries5, _Object$entries5$_i, cur, val, _data4, _args19 = arguments;
17485
17484
  return _regeneratorRuntime().wrap((function _callee19$(_context19) {
17486
17485
  while (1) switch (_context19.prev = _context19.next) {
17487
17486
  case 0:
@@ -17543,35 +17542,40 @@ function _typeof(o) {
17543
17542
  return _context19.abrupt("break", 25);
17544
17543
 
17545
17544
  case 25:
17546
- _context19.next = 27;
17547
- return fetch(url, {
17545
+ _getUrlAndHeaders8 = getUrlAndHeaders({
17546
+ url: url,
17547
+ serviceName: "Coingecko",
17548
17548
  headers: headers
17549
+ }), finalUrl = _getUrlAndHeaders8.URL, HEADERS = _getUrlAndHeaders8.HEADERS;
17550
+ _context19.next = 28;
17551
+ return fetch(finalUrl, {
17552
+ headers: HEADERS
17549
17553
  });
17550
17554
 
17551
- case 27:
17555
+ case 28:
17552
17556
  res = _context19.sent;
17553
- _context19.next = 30;
17557
+ _context19.next = 31;
17554
17558
  return res.json();
17555
17559
 
17556
- case 30:
17560
+ case 31:
17557
17561
  json = _context19.sent;
17558
17562
  if (res.ok) {
17559
- _context19.next = 36;
17563
+ _context19.next = 37;
17560
17564
  break;
17561
17565
  }
17562
17566
  msg = (json === null || json === void 0 || (_json$status = json.status) === null || _json$status === void 0 ? void 0 : _json$status.error_message) || "";
17563
17567
  if (!msg.includes("API Key Missing")) {
17564
- _context19.next = 35;
17568
+ _context19.next = 36;
17565
17569
  break;
17566
17570
  }
17567
17571
  throw new InvalidApiKeyError(SERVICES_API_KEY.Coingecko);
17568
17572
 
17569
- case 35:
17573
+ case 36:
17570
17574
  throw new NetworkError(SERVICES_API_KEY.Coingecko, res.status);
17571
17575
 
17572
- case 36:
17576
+ case 37:
17573
17577
  if (!(category === "price")) {
17574
- _context19.next = 40;
17578
+ _context19.next = 41;
17575
17579
  break;
17576
17580
  }
17577
17581
  out = {};
@@ -17586,7 +17590,7 @@ function _typeof(o) {
17586
17590
  }
17587
17591
  return _context19.abrupt("return", [ out ]);
17588
17592
 
17589
- case 40:
17593
+ case 41:
17590
17594
  _data4 = Array.isArray(json) ? json : [ json ];
17591
17595
  return _context19.abrupt("return", _data4.map((function(item) {
17592
17596
  var flat = {};
@@ -17599,16 +17603,16 @@ function _typeof(o) {
17599
17603
  return flat;
17600
17604
  })));
17601
17605
 
17602
- case 44:
17603
- _context19.prev = 44;
17606
+ case 45:
17607
+ _context19.prev = 45;
17604
17608
  _context19.t1 = _context19["catch"](0);
17605
17609
  return _context19.abrupt("return", errorMessageHandler(_context19.t1, "COINGECKO"));
17606
17610
 
17607
- case 47:
17611
+ case 48:
17608
17612
  case "end":
17609
17613
  return _context19.stop();
17610
17614
  }
17611
- }), _callee19, null, [ [ 0, 44 ] ]);
17615
+ }), _callee19, null, [ [ 0, 45 ] ]);
17612
17616
  })));
17613
17617
  return _COINGECKO.apply(this, arguments);
17614
17618
  }
@@ -17625,15 +17629,15 @@ function _typeof(o) {
17625
17629
  _context24.prev = 1;
17626
17630
  fetchJSON = function() {
17627
17631
  var _ref15 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee20(url) {
17628
- var _getUrlAndHeaders8, finalUrl, HEADERS, res, json;
17632
+ var _getUrlAndHeaders9, finalUrl, HEADERS, res, json;
17629
17633
  return _regeneratorRuntime().wrap((function _callee20$(_context20) {
17630
17634
  while (1) switch (_context20.prev = _context20.next) {
17631
17635
  case 0:
17632
- _getUrlAndHeaders8 = getUrlAndHeaders({
17636
+ _getUrlAndHeaders9 = getUrlAndHeaders({
17633
17637
  url: url,
17634
17638
  serviceName: "Etherscan",
17635
17639
  headers: {}
17636
- }), finalUrl = _getUrlAndHeaders8.URL, HEADERS = _getUrlAndHeaders8.HEADERS;
17640
+ }), finalUrl = _getUrlAndHeaders9.URL, HEADERS = _getUrlAndHeaders9.HEADERS;
17637
17641
  console.log("finalUrl", finalUrl, HEADERS);
17638
17642
  _context20.next = 4;
17639
17643
  return fetch(finalUrl, {
@@ -18029,7 +18033,7 @@ function _typeof(o) {
18029
18033
  }
18030
18034
  function _SAFE() {
18031
18035
  _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee23() {
18032
- var _argsToArray21, _argsToArray22, address, utility, chain, _argsToArray22$, limit, _argsToArray22$2, offset, apiKey, chainId, resolved, ens, url, _getUrlAndHeaders9, finalUrl, HEADERS, res, json, _args26 = arguments;
18036
+ var _argsToArray21, _argsToArray22, address, utility, chain, _argsToArray22$, limit, _argsToArray22$2, offset, apiKey, chainId, resolved, ens, url, _getUrlAndHeaders0, finalUrl, HEADERS, res, json, _args26 = arguments;
18033
18037
  return _regeneratorRuntime().wrap((function _callee23$(_context26) {
18034
18038
  while (1) switch (_context26.prev = _context26.next) {
18035
18039
  case 0:
@@ -18080,13 +18084,13 @@ function _typeof(o) {
18080
18084
 
18081
18085
  case 17:
18082
18086
  url = "https://api.safe.global/tx-service/".concat(chainId, "/api/v2/safes/").concat(resolved, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
18083
- _getUrlAndHeaders9 = getUrlAndHeaders({
18087
+ _getUrlAndHeaders0 = getUrlAndHeaders({
18084
18088
  url: url,
18085
18089
  serviceName: "Etherscan",
18086
18090
  headers: {
18087
18091
  Authorization: "Bearer ".concat(apiKey)
18088
18092
  }
18089
- }), finalUrl = _getUrlAndHeaders9.URL, HEADERS = _getUrlAndHeaders9.HEADERS;
18093
+ }), finalUrl = _getUrlAndHeaders0.URL, HEADERS = _getUrlAndHeaders0.HEADERS;
18090
18094
  _context26.next = 21;
18091
18095
  return fetch(finalUrl, {
18092
18096
  headers: HEADERS