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

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-7 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-68-patch-8 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -11329,7 +11329,7 @@ function _typeof(o) {
11329
11329
  }
11330
11330
  function _handleScanRequest() {
11331
11331
  _handleScanRequest = _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(_ref3) {
11332
- var type, address, startDate, endDate, _ref3$page, page, _ref3$offset, offset, apiKey, functionName, chainId, network, API_INFO_MAP, ensName, apiInfo, baseUrl, ACTION_MAP, action, url, _yield$Promise$all, _yield$Promise$all2, startBlock, endBlock, _getUrlAndHeaders3, finalUrl, HEADERS, res, json;
11332
+ var type, address, startDate, endDate, _ref3$page, page, _ref3$offset, offset, apiKey, functionName, chainId, network, API_INFO_MAP, ensName, apiInfo, baseUrl, ACTION_MAP, action, module, url, _yield$Promise$all, _yield$Promise$all2, startBlock, endBlock, _getUrlAndHeaders3, finalUrl, HEADERS, res, json;
11333
11333
  return _regeneratorRuntime().wrap((function _callee10$(_context10) {
11334
11334
  while (1) switch (_context10.prev = _context10.next) {
11335
11335
  case 0:
@@ -11381,7 +11381,7 @@ function _typeof(o) {
11381
11381
  "all-txns": "txlist",
11382
11382
  "token-txns": "tokentx",
11383
11383
  "nft-txns": "tokennfttx",
11384
- gas: "gastracker"
11384
+ gas: "gasoracle"
11385
11385
  };
11386
11386
  action = ACTION_MAP[type];
11387
11387
  if (action) {
@@ -11391,76 +11391,77 @@ function _typeof(o) {
11391
11391
  throw new ValidationError("Invalid type: ".concat(type));
11392
11392
 
11393
11393
  case 17:
11394
- url = "".concat(baseUrl, "?chainid=").concat(chainId, "&module=account&action=").concat(action, "&apikey=").concat(apiKey);
11394
+ module = action === "gasoracle" ? "gastracker" : "account";
11395
+ url = "".concat(baseUrl, "?chainid=").concat(chainId, "&module=").concat(module, "&action=").concat(action, "&apikey=").concat(apiKey);
11395
11396
  if (![ "all-txns", "token-txns", "nft-txns" ].includes(type)) {
11396
- _context10.next = 29;
11397
+ _context10.next = 30;
11397
11398
  break;
11398
11399
  }
11399
11400
  url += "&address=".concat(address, "&startblock=0&endblock=99999999&sort=asc");
11400
11401
  if (!(!isNaN(startDate) && !isNaN(endDate))) {
11401
- _context10.next = 28;
11402
+ _context10.next = 29;
11402
11403
  break;
11403
11404
  }
11404
- _context10.next = 23;
11405
+ _context10.next = 24;
11405
11406
  return Promise.all([ fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(startDate), network, apiKey), fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(endDate), network, apiKey) ]);
11406
11407
 
11407
- case 23:
11408
+ case 24:
11408
11409
  _yield$Promise$all = _context10.sent;
11409
11410
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
11410
11411
  startBlock = _yield$Promise$all2[0];
11411
11412
  endBlock = _yield$Promise$all2[1];
11412
11413
  url += "&startblock=".concat(startBlock || "0", "&endblock=").concat(endBlock || "99999999");
11413
11414
 
11414
- case 28:
11415
+ case 29:
11415
11416
  url += "&page=".concat(page, "&offset=").concat(offset);
11416
11417
 
11417
- case 29:
11418
+ case 30:
11418
11419
  _getUrlAndHeaders3 = getUrlAndHeaders({
11419
11420
  url: url,
11420
11421
  serviceName: "Etherscan",
11421
11422
  headers: {}
11422
11423
  }), finalUrl = _getUrlAndHeaders3.URL, HEADERS = _getUrlAndHeaders3.HEADERS;
11423
- _context10.next = 32;
11424
+ _context10.next = 33;
11424
11425
  return fetch(finalUrl, {
11425
11426
  method: "GET",
11426
11427
  headers: HEADERS
11427
11428
  });
11428
11429
 
11429
- case 32:
11430
+ case 33:
11430
11431
  res = _context10.sent;
11431
11432
  if (res.ok) {
11432
- _context10.next = 35;
11433
+ _context10.next = 36;
11433
11434
  break;
11434
11435
  }
11435
11436
  throw new NetworkError(apiInfo.apiKeyName, res.status);
11436
11437
 
11437
- case 35:
11438
- _context10.next = 37;
11438
+ case 36:
11439
+ _context10.next = 38;
11439
11440
  return res.json();
11440
11441
 
11441
- case 37:
11442
+ case 38:
11442
11443
  json = _context10.sent;
11443
11444
  if (!(typeof json.result === "string")) {
11444
- _context10.next = 43;
11445
+ _context10.next = 44;
11445
11446
  break;
11446
11447
  }
11447
11448
  if (!json.result.includes("Invalid API Key")) {
11448
- _context10.next = 41;
11449
+ _context10.next = 42;
11449
11450
  break;
11450
11451
  }
11451
11452
  throw new InvalidApiKeyError(apiInfo.apiKeyName);
11452
11453
 
11453
- case 41:
11454
+ case 42:
11454
11455
  if (!json.result.includes("Max rate limit reached")) {
11455
- _context10.next = 43;
11456
+ _context10.next = 44;
11456
11457
  break;
11457
11458
  }
11458
11459
  throw new RateLimitError(apiInfo.apiKeyName);
11459
11460
 
11460
- case 43:
11461
- return _context10.abrupt("return", json.result);
11462
-
11463
11461
  case 44:
11462
+ return _context10.abrupt("return", type === "gas" && !Array.isArray(json.result) ? [ json.result ] : json.result);
11463
+
11464
+ case 45:
11464
11465
  case "end":
11465
11466
  return _context10.stop();
11466
11467
  }
@@ -16578,14 +16579,18 @@ function _typeof(o) {
16578
16579
  contentType: enumType([ "posts", "replies", "channels" ]),
16579
16580
  identifier: stringType().nonempty(),
16580
16581
  start: numberType()["int"]().nonnegative()["default"](0),
16581
- end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16582
+ end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16583
+ message: '"end" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16584
+ })["default"](10)
16582
16585
  });
16583
16586
  var lensSchema = objectType({
16584
16587
  platform: literalType("lens"),
16585
16588
  contentType: enumType([ "posts", "replies" ]),
16586
16589
  identifier: stringType().nonempty(),
16587
16590
  start: numberType()["int"]().nonnegative()["default"](0),
16588
- end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16591
+ end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16592
+ message: '"end" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16593
+ })["default"](10)
16589
16594
  });
16590
16595
  var fireflyParamsSchema = discriminatedUnionType("platform", [ farcasterSchema, lensSchema ]);
16591
16596
  var fireFlyPlaformType = {
@@ -16603,21 +16608,33 @@ function _typeof(o) {
16603
16608
  contentType: enumType([ "posts", "replies" ]),
16604
16609
  identifier: stringType().nonempty(),
16605
16610
  start: numberType()["int"]().nonnegative()["default"](0),
16606
- end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16611
+ end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16612
+ message: '"end" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16613
+ })["default"](10)
16607
16614
  });
16608
16615
  var farcasterParamsSchema = objectType({
16609
16616
  contentType: enumType([ "posts", "replies", "channels" ]),
16610
16617
  identifier: stringType().nonempty(),
16611
16618
  start: numberType()["int"]().nonnegative()["default"](0),
16612
- end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16619
+ end: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16620
+ message: '"end" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16621
+ })["default"](10)
16613
16622
  });
16614
16623
  var dateStringToTimestamp = function dateStringToTimestamp(val) {
16615
- var _val$split = val.split("/"), _val$split2 = _slicedToArray(_val$split, 3), mm = _val$split2[0], dd = _val$split2[1], yyyy = _val$split2[2];
16616
- return Math.floor(new Date("".concat(yyyy, "-").concat(mm, "-").concat(dd)).getTime() / 1e3);
16624
+ var _val$split = val.split("/"), _val$split2 = _slicedToArray(_val$split, 3), dd = _val$split2[0], mm = _val$split2[1], yyyy = _val$split2[2];
16625
+ var date = new Date("".concat(yyyy, "-").concat(mm.padStart(2, "0"), "-").concat(dd.padStart(2, "0")));
16626
+ var timestamp = date.getTime();
16627
+ return isNaN(timestamp) ? NaN : Math.floor(timestamp / 1e3);
16617
16628
  };
16618
16629
  var dateOrTimestamp = preprocessType((function(val) {
16619
- return typeof val === "string" && /^\d{2}\/\d{2}\/\d{4}$/.test(val) ? dateStringToTimestamp(val) : val;
16620
- }), numberType()["int"]().nonnegative());
16630
+ return typeof val === "string" && /^\d{1,2}\/\d{1,2}\/\d{4}$/.test(val) ? dateStringToTimestamp(val) : val;
16631
+ }), numberType({
16632
+ invalid_type_error: "Date must be a valid DD/MM/YYYY or timestamp"
16633
+ })["int"]("Date must be an integer timestamp").nonnegative("Date must be a nonnegative timestamp").refine((function(n) {
16634
+ return !isNaN(n);
16635
+ }), {
16636
+ message: "Invalid date format or value: expected DD/MM/YYYY"
16637
+ }));
16621
16638
  var blockscoutParamsSchema = objectType({
16622
16639
  address: stringType().nonempty(),
16623
16640
  type: enumType([ "stat", "txns", "tokens" ]),
@@ -16625,14 +16642,18 @@ function _typeof(o) {
16625
16642
  startTimestamp: dateOrTimestamp.optional(),
16626
16643
  endTimestamp: dateOrTimestamp.optional(),
16627
16644
  page: numberType()["int"]().nonnegative()["default"](1),
16628
- offset: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16645
+ offset: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16646
+ message: '"offset" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16647
+ })["default"](10)
16629
16648
  });
16630
16649
  var gasSchema$1 = objectType({
16631
16650
  type: literalType("gas"),
16632
16651
  startDate: dateOrTimestamp.optional(),
16633
16652
  endDate: dateOrTimestamp.optional(),
16634
16653
  page: numberType()["int"]().nonnegative()["default"](1),
16635
- limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16654
+ limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16655
+ message: '"limit" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16656
+ })["default"](10)
16636
16657
  });
16637
16658
  var txnSchema$1 = objectType({
16638
16659
  type: enumType([ "all-txns", "token-txns", "nft-txns" ]),
@@ -16640,7 +16661,9 @@ function _typeof(o) {
16640
16661
  startDate: dateOrTimestamp.optional(),
16641
16662
  endDate: dateOrTimestamp.optional(),
16642
16663
  page: numberType()["int"]().nonnegative()["default"](1),
16643
- limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16664
+ limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16665
+ message: '"limit" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16666
+ })["default"](10)
16644
16667
  });
16645
16668
  var baseParamsSchema = discriminatedUnionType("type", [ gasSchema$1, txnSchema$1 ]);
16646
16669
  var gasSchema = objectType({
@@ -16648,7 +16671,9 @@ function _typeof(o) {
16648
16671
  startDate: dateOrTimestamp.optional(),
16649
16672
  endDate: dateOrTimestamp.optional(),
16650
16673
  page: numberType()["int"]().nonnegative()["default"](1),
16651
- limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16674
+ limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16675
+ message: '"limit" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16676
+ })["default"](10)
16652
16677
  });
16653
16678
  var txnSchema = objectType({
16654
16679
  type: enumType([ "all-txns", "token-txns", "nft-txns" ]),
@@ -16657,9 +16682,24 @@ function _typeof(o) {
16657
16682
  endDate: dateOrTimestamp.optional(),
16658
16683
  chain: enumType([ "ethereum", "base", "gnosis" ]),
16659
16684
  page: numberType()["int"]().nonnegative()["default"](1),
16660
- limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16685
+ limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16686
+ message: '"limit" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16687
+ })["default"](10)
16661
16688
  });
16662
16689
  var etherscanParamsSchema = discriminatedUnionType("type", [ gasSchema, txnSchema ]);
16690
+ var allowedValues = [ "1h", "24h", "7d" ];
16691
+ var param2Schema = stringType().refine((function(val) {
16692
+ var tokens = val.split(",").map((function(t) {
16693
+ return t.trim().toLowerCase();
16694
+ }));
16695
+ return tokens.some((function(token) {
16696
+ return allowedValues.some((function(allowed) {
16697
+ return token.includes(allowed);
16698
+ }));
16699
+ }));
16700
+ }), {
16701
+ message: "param2 must contain at least one of: '1h', '24h', '7d'"
16702
+ }).optional();
16663
16703
  var priceSchema = objectType({
16664
16704
  category: literalType("price"),
16665
16705
  param1: stringType().nonempty(),
@@ -16669,13 +16709,13 @@ function _typeof(o) {
16669
16709
  var marketSchema = objectType({
16670
16710
  category: literalType("market"),
16671
16711
  param1: enumType(marketEcosystems),
16672
- param2: enumType([ "1h", "24h", "7d" ]).optional()
16712
+ param2: param2Schema
16673
16713
  });
16674
16714
  var stablecoinsTypes = [ "all", "yield-bearing-stablecoins", "crypto-backed-stablecoin" ];
16675
16715
  var stablecoinsSchema = objectType({
16676
16716
  category: literalType("stablecoins"),
16677
16717
  param1: enumType(stablecoinsTypes),
16678
- param2: enumType([ "1h", "24h", "7d" ]).optional()
16718
+ param2: param2Schema
16679
16719
  });
16680
16720
  var derivativesSchema = objectType({
16681
16721
  category: literalType("derivatives"),
@@ -16694,7 +16734,9 @@ function _typeof(o) {
16694
16734
  startTime: dateOrTimestamp.optional(),
16695
16735
  endTime: dateOrTimestamp.optional(),
16696
16736
  page: numberType()["int"]().nonnegative()["default"](1),
16697
- offset: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10)
16737
+ offset: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16738
+ message: '"offset" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16739
+ })["default"](10)
16698
16740
  });
16699
16741
  var eoaParamsSchema = preprocessType((function(val) {
16700
16742
  var obj = _objectSpread({}, val || {});
@@ -16716,7 +16758,9 @@ function _typeof(o) {
16716
16758
  address: stringType().nonempty(),
16717
16759
  utility: literalType("txns"),
16718
16760
  chain: enumType([ "ethereum", "gnosis" ]),
16719
- limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT)["default"](10),
16761
+ limit: numberType()["int"]().nonnegative().max(MAX_PAGE_LIMIT, {
16762
+ message: '"limit" must be less than or equal to '.concat(MAX_PAGE_LIMIT)
16763
+ })["default"](10),
16720
16764
  offset: numberType()["int"]().nonnegative()["default"](0)
16721
16765
  });
16722
16766
  var categories = [ "protocols", "yields", "dex", "fees" ];
@@ -16780,7 +16824,9 @@ function _typeof(o) {
16780
16824
  _getUrlAndHeaders4 = getUrlAndHeaders({
16781
16825
  url: url.toString(),
16782
16826
  serviceName: "Firefly",
16783
- headers: headers
16827
+ headers: {
16828
+ "x-api-key": apiKey
16829
+ }
16784
16830
  }), finalUrl = _getUrlAndHeaders4.URL, HEADERS = _getUrlAndHeaders4.HEADERS;
16785
16831
  _context11.next = 14;
16786
16832
  return fetch(finalUrl, {
@@ -16877,7 +16923,9 @@ function _typeof(o) {
16877
16923
  _getUrlAndHeaders5 = getUrlAndHeaders({
16878
16924
  url: url.toString(),
16879
16925
  serviceName: "Firefly",
16880
- headers: headers
16926
+ headers: {
16927
+ "x-api-key": apiKey
16928
+ }
16881
16929
  }), finalUrl = _getUrlAndHeaders5.URL, HEADERS = _getUrlAndHeaders5.HEADERS;
16882
16930
  _context12.next = 15;
16883
16931
  return fetch(finalUrl, {
@@ -16975,7 +17023,9 @@ function _typeof(o) {
16975
17023
  _getUrlAndHeaders6 = getUrlAndHeaders({
16976
17024
  url: url.toString(),
16977
17025
  serviceName: "Firefly",
16978
- headers: headers
17026
+ headers: {
17027
+ "x-api-key": apiKey
17028
+ }
16979
17029
  }), finalUrl = _getUrlAndHeaders6.URL, HEADERS = _getUrlAndHeaders6.HEADERS;
16980
17030
  _context13.next = 15;
16981
17031
  return fetch(finalUrl, {
@@ -17142,7 +17192,7 @@ function _typeof(o) {
17142
17192
  }
17143
17193
  function _BASE() {
17144
17194
  _BASE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee15() {
17145
- var _argsToArray1, _argsToArray10, type, address, startDate, endDate, page, limit, _API_KEY, _args15 = arguments;
17195
+ var _argsToArray1, _argsToArray10, type, address, startDate, endDate, page, limit, API_KEY, _args15 = arguments;
17146
17196
  return _regeneratorRuntime().wrap((function _callee15$(_context15) {
17147
17197
  while (1) switch (_context15.prev = _context15.next) {
17148
17198
  case 0:
@@ -17158,8 +17208,8 @@ function _typeof(o) {
17158
17208
  page: page,
17159
17209
  limit: limit
17160
17210
  });
17161
- _API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Basescan);
17162
- if (_API_KEY) {
17211
+ API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Basescan);
17212
+ if (API_KEY) {
17163
17213
  _context15.next = 6;
17164
17214
  break;
17165
17215
  }
@@ -17174,7 +17224,7 @@ function _typeof(o) {
17174
17224
  endDate: endDate,
17175
17225
  page: page,
17176
17226
  offset: limit,
17177
- apiKey: _API_KEY,
17227
+ apiKey: API_KEY,
17178
17228
  functionName: "BASE",
17179
17229
  chainId: CHAIN_ID_MAP.base,
17180
17230
  network: "base"
@@ -17299,10 +17349,8 @@ function _typeof(o) {
17299
17349
  url: url.toString(),
17300
17350
  serviceName: "Firefly",
17301
17351
  headers: {
17302
- headers: {
17303
- "x-api-key": API_KEY,
17304
- "x-neynar-experimental": "false"
17305
- }
17352
+ "x-api-key": apiKey,
17353
+ "x-neynar-experimental": "false"
17306
17354
  }
17307
17355
  }), finalUrl = _getUrlAndHeaders7.URL, HEADERS = _getUrlAndHeaders7.HEADERS;
17308
17356
  _context17.next = 16;
@@ -17433,7 +17481,7 @@ function _typeof(o) {
17433
17481
  }
17434
17482
  function _COINGECKO() {
17435
17483
  _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee19() {
17436
- 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;
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;
17437
17485
  return _regeneratorRuntime().wrap((function _callee19$(_context19) {
17438
17486
  while (1) switch (_context19.prev = _context19.next) {
17439
17487
  case 0:
@@ -17453,7 +17501,7 @@ function _typeof(o) {
17453
17501
  throw new MissingApiKeyError(SERVICES_API_KEY.Coingecko);
17454
17502
 
17455
17503
  case 6:
17456
- _headers = {
17504
+ headers = {
17457
17505
  accept: "application/json",
17458
17506
  "x-cg-demo-api-key": apiKey
17459
17507
  };
@@ -17497,7 +17545,7 @@ function _typeof(o) {
17497
17545
  case 25:
17498
17546
  _context19.next = 27;
17499
17547
  return fetch(url, {
17500
- headers: _headers
17548
+ headers: headers
17501
17549
  });
17502
17550
 
17503
17551
  case 27:
@@ -17981,7 +18029,7 @@ function _typeof(o) {
17981
18029
  }
17982
18030
  function _SAFE() {
17983
18031
  _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee23() {
17984
- var _argsToArray21, _argsToArray22, address, utility, chain, _argsToArray22$, limit, _argsToArray22$2, offset, apiKey, chainId, resolved, ens, url, res, json, _args26 = arguments;
18032
+ var _argsToArray21, _argsToArray22, address, utility, chain, _argsToArray22$, limit, _argsToArray22$2, offset, apiKey, chainId, resolved, ens, url, _getUrlAndHeaders9, finalUrl, HEADERS, res, json, _args26 = arguments;
17985
18033
  return _regeneratorRuntime().wrap((function _callee23$(_context26) {
17986
18034
  while (1) switch (_context26.prev = _context26.next) {
17987
18035
  case 0:
@@ -18032,49 +18080,54 @@ function _typeof(o) {
18032
18080
 
18033
18081
  case 17:
18034
18082
  url = "https://api.safe.global/tx-service/".concat(chainId, "/api/v2/safes/").concat(resolved, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
18035
- _context26.next = 20;
18036
- return fetch(url, {
18083
+ _getUrlAndHeaders9 = getUrlAndHeaders({
18084
+ url: url,
18085
+ serviceName: "Etherscan",
18037
18086
  headers: {
18038
18087
  Authorization: "Bearer ".concat(apiKey)
18039
18088
  }
18089
+ }), finalUrl = _getUrlAndHeaders9.URL, HEADERS = _getUrlAndHeaders9.HEADERS;
18090
+ _context26.next = 21;
18091
+ return fetch(finalUrl, {
18092
+ headers: HEADERS
18040
18093
  });
18041
18094
 
18042
- case 20:
18095
+ case 21:
18043
18096
  res = _context26.sent;
18044
18097
  if (res.ok) {
18045
- _context26.next = 23;
18098
+ _context26.next = 24;
18046
18099
  break;
18047
18100
  }
18048
18101
  throw new NetworkError(SERVICES_API_KEY.Safe, res.status);
18049
18102
 
18050
- case 23:
18051
- _context26.next = 25;
18103
+ case 24:
18104
+ _context26.next = 26;
18052
18105
  return res.json();
18053
18106
 
18054
- case 25:
18107
+ case 26:
18055
18108
  json = _context26.sent;
18056
18109
  if (Array.isArray(json.results)) {
18057
- _context26.next = 28;
18110
+ _context26.next = 29;
18058
18111
  break;
18059
18112
  }
18060
18113
  throw new ValidationError("Invalid API response");
18061
18114
 
18062
- case 28:
18115
+ case 29:
18063
18116
  return _context26.abrupt("return", json.results.map((function(_ref16) {
18064
18117
  var confirmations = _ref16.confirmations, dataDecoded = _ref16.dataDecoded, rest = _objectWithoutProperties(_ref16, _excluded);
18065
18118
  return rest;
18066
18119
  })));
18067
18120
 
18068
- case 31:
18069
- _context26.prev = 31;
18121
+ case 32:
18122
+ _context26.prev = 32;
18070
18123
  _context26.t0 = _context26["catch"](0);
18071
18124
  return _context26.abrupt("return", errorMessageHandler(_context26.t0, "SAFE"));
18072
18125
 
18073
- case 34:
18126
+ case 35:
18074
18127
  case "end":
18075
18128
  return _context26.stop();
18076
18129
  }
18077
- }), _callee23, null, [ [ 0, 31 ] ]);
18130
+ }), _callee23, null, [ [ 0, 32 ] ]);
18078
18131
  })));
18079
18132
  return _SAFE.apply(this, arguments);
18080
18133
  }