@ref-finance/ref-sdk 1.3.7 → 1.3.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.
@@ -4675,24 +4675,36 @@
4675
4675
  }();
4676
4676
  var fetchAllPools = /*#__PURE__*/function () {
4677
4677
  var _ref9 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(perPage) {
4678
- var totalPools, pages, pools;
4678
+ var _pools, totalPools, pages, pools;
4679
4679
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
4680
4680
  while (1) {
4681
4681
  switch (_context7.prev = _context7.next) {
4682
4682
  case 0:
4683
+ _context7.prev = 0;
4684
+ _context7.next = 3;
4685
+ return fetch(exports.config.indexerUrl + "/fetchAllPools").then(function (res) {
4686
+ return res.json();
4687
+ });
4688
+ case 3:
4689
+ _pools = _context7.sent;
4690
+ return _context7.abrupt("return", _pools);
4691
+ case 7:
4692
+ _context7.prev = 7;
4693
+ _context7.t0 = _context7["catch"](0);
4694
+ case 9:
4683
4695
  if (perPage) {
4684
4696
  DEFAULT_PAGE_LIMIT = Math.min(perPage, 500);
4685
4697
  }
4686
- _context7.next = 3;
4698
+ _context7.next = 12;
4687
4699
  return getTotalPools();
4688
- case 3:
4700
+ case 12:
4689
4701
  totalPools = _context7.sent;
4690
4702
  pages = Math.ceil(totalPools / DEFAULT_PAGE_LIMIT);
4691
- _context7.next = 7;
4703
+ _context7.next = 16;
4692
4704
  return Promise.all([].concat(Array(pages)).fill(0).map(function (_, i) {
4693
4705
  return getRefPools(i + 1);
4694
4706
  }));
4695
- case 7:
4707
+ case 16:
4696
4708
  pools = _context7.sent.flat();
4697
4709
  return _context7.abrupt("return", {
4698
4710
  simplePools: pools.filter(function (p) {
@@ -4705,12 +4717,12 @@
4705
4717
  return p.pool_kind && p.pool_kind === 'RATED_SWAP';
4706
4718
  })
4707
4719
  });
4708
- case 9:
4720
+ case 18:
4709
4721
  case "end":
4710
4722
  return _context7.stop();
4711
4723
  }
4712
4724
  }
4713
- }, _callee7);
4725
+ }, _callee7, null, [[0, 7]]);
4714
4726
  }));
4715
4727
  return function fetchAllPools(_x8) {
4716
4728
  return _ref9.apply(this, arguments);