@fileverse-dev/formulajs 4.4.11-mod-30 → 4.4.11-mod-33

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-30 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-33 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -12300,52 +12300,70 @@ function _typeof(o) {
12300
12300
  return _context15.abrupt("return", "CHAIN IS NOT SUPPORTED");
12301
12301
 
12302
12302
  case 12:
12303
+ if (isAddress(address)) {
12304
+ _context15.next = 16;
12305
+ break;
12306
+ }
12307
+ _context15.next = 15;
12308
+ return fromEnsNameToAddress(address);
12309
+
12310
+ case 15:
12311
+ address = _context15.sent;
12312
+
12313
+ case 16:
12314
+ if (address) {
12315
+ _context15.next = 18;
12316
+ break;
12317
+ }
12318
+ return _context15.abrupt("return", "".concat(address).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12319
+
12320
+ case 18:
12303
12321
  url = "https://api.safe.global/tx-service/".concat(chainIdentifier, "/api/v2/safes/").concat(address, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
12304
- _context15.prev = 13;
12305
- _context15.next = 16;
12322
+ _context15.prev = 19;
12323
+ _context15.next = 22;
12306
12324
  return fetch(url, {
12307
12325
  headers: {
12308
12326
  Authorization: "Bearer ".concat(apiKey)
12309
12327
  }
12310
12328
  });
12311
12329
 
12312
- case 16:
12330
+ case 22:
12313
12331
  response = _context15.sent;
12314
12332
  if (response.ok) {
12315
- _context15.next = 19;
12333
+ _context15.next = 25;
12316
12334
  break;
12317
12335
  }
12318
12336
  throw new Error("HTTP error! Status: ".concat(response.status));
12319
12337
 
12320
- case 19:
12321
- _context15.next = 21;
12338
+ case 25:
12339
+ _context15.next = 27;
12322
12340
  return response.json();
12323
12341
 
12324
- case 21:
12342
+ case 27:
12325
12343
  json = _context15.sent;
12326
12344
  if (Array.isArray(json.results)) {
12327
- _context15.next = 24;
12345
+ _context15.next = 30;
12328
12346
  break;
12329
12347
  }
12330
12348
  return _context15.abrupt("return", "INVALID API RESPONSE");
12331
12349
 
12332
- case 24:
12350
+ case 30:
12333
12351
  return _context15.abrupt("return", json.results.map((function(_ref5) {
12334
12352
  var confirmations = _ref5.confirmations, dataDecoded = _ref5.dataDecoded, rest = _objectWithoutProperties(_ref5, _excluded);
12335
12353
  return rest;
12336
12354
  })));
12337
12355
 
12338
- case 27:
12339
- _context15.prev = 27;
12340
- _context15.t0 = _context15["catch"](13);
12356
+ case 33:
12357
+ _context15.prev = 33;
12358
+ _context15.t0 = _context15["catch"](19);
12341
12359
  console.log(_context15.t0);
12342
12360
  return _context15.abrupt("return", "ERROR IN FETCHING");
12343
12361
 
12344
- case 31:
12362
+ case 37:
12345
12363
  case "end":
12346
12364
  return _context15.stop();
12347
12365
  }
12348
- }), _callee13, null, [ [ 13, 27 ] ]);
12366
+ }), _callee13, null, [ [ 19, 33 ] ]);
12349
12367
  })));
12350
12368
  return _SAFE.apply(this, arguments);
12351
12369
  }