@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.
- package/dist/ref-sdk.cjs.development.js +19 -7
- package/dist/ref-sdk.cjs.development.js.map +1 -1
- package/dist/ref-sdk.cjs.production.min.js +1 -1
- package/dist/ref-sdk.cjs.production.min.js.map +1 -1
- package/dist/ref-sdk.esm.js +19 -7
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +19 -7
- package/dist/ref-sdk.umd.development.js.map +1 -1
- package/dist/ref-sdk.umd.production.min.js +1 -1
- package/dist/ref-sdk.umd.production.min.js.map +1 -1
- package/dist/v1-swap/pool.d.ts +1 -5
- package/package.json +1 -1
|
@@ -4694,24 +4694,36 @@ var getRefPools = /*#__PURE__*/function () {
|
|
|
4694
4694
|
}();
|
|
4695
4695
|
var fetchAllPools = /*#__PURE__*/function () {
|
|
4696
4696
|
var _ref9 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(perPage) {
|
|
4697
|
-
var totalPools, pages, pools;
|
|
4697
|
+
var _pools, totalPools, pages, pools;
|
|
4698
4698
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
4699
4699
|
while (1) {
|
|
4700
4700
|
switch (_context7.prev = _context7.next) {
|
|
4701
4701
|
case 0:
|
|
4702
|
+
_context7.prev = 0;
|
|
4703
|
+
_context7.next = 3;
|
|
4704
|
+
return fetch(exports.config.indexerUrl + "/fetchAllPools").then(function (res) {
|
|
4705
|
+
return res.json();
|
|
4706
|
+
});
|
|
4707
|
+
case 3:
|
|
4708
|
+
_pools = _context7.sent;
|
|
4709
|
+
return _context7.abrupt("return", _pools);
|
|
4710
|
+
case 7:
|
|
4711
|
+
_context7.prev = 7;
|
|
4712
|
+
_context7.t0 = _context7["catch"](0);
|
|
4713
|
+
case 9:
|
|
4702
4714
|
if (perPage) {
|
|
4703
4715
|
DEFAULT_PAGE_LIMIT = Math.min(perPage, 500);
|
|
4704
4716
|
}
|
|
4705
|
-
_context7.next =
|
|
4717
|
+
_context7.next = 12;
|
|
4706
4718
|
return getTotalPools();
|
|
4707
|
-
case
|
|
4719
|
+
case 12:
|
|
4708
4720
|
totalPools = _context7.sent;
|
|
4709
4721
|
pages = Math.ceil(totalPools / DEFAULT_PAGE_LIMIT);
|
|
4710
|
-
_context7.next =
|
|
4722
|
+
_context7.next = 16;
|
|
4711
4723
|
return Promise.all([].concat(Array(pages)).fill(0).map(function (_, i) {
|
|
4712
4724
|
return getRefPools(i + 1);
|
|
4713
4725
|
}));
|
|
4714
|
-
case
|
|
4726
|
+
case 16:
|
|
4715
4727
|
pools = _context7.sent.flat();
|
|
4716
4728
|
return _context7.abrupt("return", {
|
|
4717
4729
|
simplePools: pools.filter(function (p) {
|
|
@@ -4724,12 +4736,12 @@ var fetchAllPools = /*#__PURE__*/function () {
|
|
|
4724
4736
|
return p.pool_kind && p.pool_kind === 'RATED_SWAP';
|
|
4725
4737
|
})
|
|
4726
4738
|
});
|
|
4727
|
-
case
|
|
4739
|
+
case 18:
|
|
4728
4740
|
case "end":
|
|
4729
4741
|
return _context7.stop();
|
|
4730
4742
|
}
|
|
4731
4743
|
}
|
|
4732
|
-
}, _callee7);
|
|
4744
|
+
}, _callee7, null, [[0, 7]]);
|
|
4733
4745
|
}));
|
|
4734
4746
|
return function fetchAllPools(_x8) {
|
|
4735
4747
|
return _ref9.apply(this, arguments);
|