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