@fileverse-dev/fortune-react 1.0.2-mod-55 → 1.0.2-mod-55-safe-patch-1

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.
package/dist/index.umd.js CHANGED
@@ -23968,6 +23968,7 @@
23968
23968
  }));
23969
23969
  });
23970
23970
 
23971
+ var _excluded = ["confirmations", "dataDecoded"];
23971
23972
  var nil = new Error('#NULL!');
23972
23973
  var div0 = new Error('#DIV/0!');
23973
23974
  var value = new Error('#VALUE!');
@@ -35237,13 +35238,18 @@
35237
35238
  }
35238
35239
  var SERVICE_API_KEY = {
35239
35240
  Etherscan: "ETHERSCAN_API_KEY",
35240
- Coingecko: "COINGECKO_API_KEY"
35241
+ Coingecko: "COINGECKO_API_KEY",
35242
+ Safe: "SAFE_API_KEY"
35241
35243
  };
35242
35244
  var CHAIN_ID_MAP = {
35243
35245
  ethereum: 1,
35244
35246
  gnosis: 100,
35245
35247
  base: 8453
35246
35248
  };
35249
+ var SAFE_CHAIN_MAP = {
35250
+ ethereum: 'eth',
35251
+ gnosis: 'gno'
35252
+ };
35247
35253
  var fromTimeStampToBlock = /*#__PURE__*/function () {
35248
35254
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(timestamp, chain, apiKey) {
35249
35255
  var chainId, url, res, json;
@@ -35380,11 +35386,11 @@
35380
35386
  }));
35381
35387
  return _GETPRICE.apply(this, arguments);
35382
35388
  }
35383
- function EOA(_x9, _x0, _x1, _x10, _x11) {
35384
- return _EOA.apply(this, arguments);
35389
+ function OX(_x9, _x0, _x1, _x10, _x11) {
35390
+ return _OX.apply(this, arguments);
35385
35391
  }
35386
- function _EOA() {
35387
- _EOA = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(address, categories, chain, startTime, endTime) {
35392
+ function _OX() {
35393
+ _OX = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(address, categories, chain, startTime, endTime) {
35388
35394
  var API_KEYS, apiKey, chainId, action, timeQuery, startBlock, endBlock, url, _json$result, _json$result$includes, response, json, _t3;
35389
35395
  return _regenerator().w(function (_context4) {
35390
35396
  while (1) switch (_context4.n) {
@@ -35464,7 +35470,7 @@
35464
35470
  }
35465
35471
  }, _callee4, null, [[7, 12]]);
35466
35472
  }));
35467
- return _EOA.apply(this, arguments);
35473
+ return _OX.apply(this, arguments);
35468
35474
  }
35469
35475
  function FLVURL(_x12, _x13) {
35470
35476
  return _FLVURL.apply(this, arguments);
@@ -35486,6 +35492,89 @@
35486
35492
  }));
35487
35493
  return _FLVURL.apply(this, arguments);
35488
35494
  }
35495
+ function SAFE(_x14, _x15, _x16, _x17, _x18) {
35496
+ return _SAFE.apply(this, arguments);
35497
+ }
35498
+ function _SAFE() {
35499
+ _SAFE = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(address, utility, chain, limit, offset) {
35500
+ var apiKey, chainIdentifier, url, response, json, _t4;
35501
+ return _regenerator().w(function (_context6) {
35502
+ while (1) switch (_context6.n) {
35503
+ case 0:
35504
+ if (!(typeof limit !== 'number' || limit < 0)) {
35505
+ _context6.n = 1;
35506
+ break;
35507
+ }
35508
+ return _context6.a(2, 'INVALID_LIMIT');
35509
+ case 1:
35510
+ if (!(typeof offset !== 'number' || offset < 0)) {
35511
+ _context6.n = 2;
35512
+ break;
35513
+ }
35514
+ return _context6.a(2, 'INVALID_OFFSET');
35515
+ case 2:
35516
+ if (!(utility !== 'txns')) {
35517
+ _context6.n = 3;
35518
+ break;
35519
+ }
35520
+ return _context6.a(2, 'UTILITY IS NOT SUPPORTED');
35521
+ case 3:
35522
+ apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
35523
+ chainIdentifier = SAFE_CHAIN_MAP[chain];
35524
+ if (apiKey) {
35525
+ _context6.n = 4;
35526
+ break;
35527
+ }
35528
+ return _context6.a(2, "".concat(SERVICE_API_KEY.Safe, "_MISSING"));
35529
+ case 4:
35530
+ if (chainIdentifier) {
35531
+ _context6.n = 5;
35532
+ break;
35533
+ }
35534
+ return _context6.a(2, 'CHAIN IS NOT SUPPORTED');
35535
+ case 5:
35536
+ url = "https://api.safe.global/tx-service/".concat(chainIdentifier, "/api/v2/safes/").concat(address, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
35537
+ _context6.p = 6;
35538
+ _context6.n = 7;
35539
+ return fetch(url, {
35540
+ headers: {
35541
+ 'Authorization': "Bearer ".concat(apiKey)
35542
+ }
35543
+ });
35544
+ case 7:
35545
+ response = _context6.v;
35546
+ if (response.ok) {
35547
+ _context6.n = 8;
35548
+ break;
35549
+ }
35550
+ throw new Error("HTTP error! Status: ".concat(response.status));
35551
+ case 8:
35552
+ _context6.n = 9;
35553
+ return response.json();
35554
+ case 9:
35555
+ json = _context6.v;
35556
+ if (Array.isArray(json.results)) {
35557
+ _context6.n = 10;
35558
+ break;
35559
+ }
35560
+ return _context6.a(2, "INVALID API RESPONSE");
35561
+ case 10:
35562
+ return _context6.a(2, json.results.map(function (_ref2) {
35563
+ var confirmations = _ref2.confirmations,
35564
+ dataDecoded = _ref2.dataDecoded,
35565
+ rest = _objectWithoutProperties(_ref2, _excluded);
35566
+ return rest;
35567
+ }));
35568
+ case 11:
35569
+ _context6.p = 11;
35570
+ _t4 = _context6.v;
35571
+ console.log(_t4);
35572
+ return _context6.a(2, "ERROR IN FETCHING");
35573
+ }
35574
+ }, _callee6, null, [[6, 11]]);
35575
+ }));
35576
+ return _SAFE.apply(this, arguments);
35577
+ }
35489
35578
  var utils = {
35490
35579
  errors: errors$1,
35491
35580
  symbols: symbols,
@@ -35606,7 +35695,6 @@
35606
35695
  DVARP: DVARP,
35607
35696
  EDATE: EDATE,
35608
35697
  EFFECT: EFFECT,
35609
- EOA: EOA,
35610
35698
  EOMONTH: EOMONTH,
35611
35699
  ERF: ERF,
35612
35700
  ERFC: ERFC,
@@ -35764,6 +35852,7 @@
35764
35852
  OCT2HEX: OCT2HEX,
35765
35853
  ODD: ODD,
35766
35854
  OR: OR,
35855
+ OX: OX,
35767
35856
  PDURATION: PDURATION,
35768
35857
  PEARSON: PEARSON,
35769
35858
  PERCENTILE: PERCENTILE,
@@ -35809,6 +35898,7 @@
35809
35898
  ROWS: ROWS,
35810
35899
  RRI: RRI,
35811
35900
  RSQ: RSQ,
35901
+ SAFE: SAFE,
35812
35902
  SEARCH: SEARCH,
35813
35903
  SEC: SEC,
35814
35904
  SECH: SECH,
@@ -58799,13 +58889,13 @@ React keys must be passed directly to JSX without using spread:
58799
58889
  * This source code is licensed under the ISC license.
58800
58890
  * See the LICENSE file in the root directory of this source tree.
58801
58891
  */
58802
- const OX = [
58892
+ const OX$1 = [
58803
58893
  ["path", { d: "M10 3v11", key: "o3l5kj" }],
58804
58894
  ["path", { d: "M10 9H7a1 1 0 0 1 0-6h8", key: "1wb1nc" }],
58805
58895
  ["path", { d: "M14 3v11", key: "mlfb7b" }],
58806
58896
  ["path", { d: "m18 14 4 4H2", key: "4r8io1" }],
58807
58897
  ["path", { d: "m22 18-4 4", key: "1hjjrd" }]
58808
- ], qX = i$2("PilcrowRight", OX);
58898
+ ], qX = i$2("PilcrowRight", OX$1);
58809
58899
  /**
58810
58900
  * @license lucide-react v0.475.0 - ISC
58811
58901
  *
@@ -118570,7 +118660,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
118570
118660
  }, "Embed")));
118571
118661
  };
118572
118662
 
118573
- var _excluded = ["onChange", "onOp", "data"];
118663
+ var _excluded$1 = ["onChange", "onOp", "data"];
118574
118664
  T$1();
118575
118665
  var triggerGroupValuesRefresh = function triggerGroupValuesRefresh(ctx) {
118576
118666
  if (ctx.groupValuesRefreshData.length > 0) {
@@ -118592,7 +118682,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
118592
118682
  var onChange = _ref.onChange,
118593
118683
  onOp = _ref.onOp,
118594
118684
  originalData = _ref.data,
118595
- props = _objectWithoutProperties(_ref, _excluded);
118685
+ props = _objectWithoutProperties(_ref, _excluded$1);
118596
118686
  var globalCache = React.useRef({
118597
118687
  undoList: [],
118598
118688
  redoList: []