@ref-finance/ref-sdk 1.3.12 → 1.4.0
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 +15 -9
- 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 +15 -9
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +15 -9
- 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/package.json +1 -1
package/dist/ref-sdk.esm.js
CHANGED
|
@@ -4750,24 +4750,30 @@ var fetchAllPools = /*#__PURE__*/function () {
|
|
|
4750
4750
|
});
|
|
4751
4751
|
case 3:
|
|
4752
4752
|
_pools = _context7.sent;
|
|
4753
|
+
if (!(_pools.code !== 0 || !_pools.simplePools)) {
|
|
4754
|
+
_context7.next = 6;
|
|
4755
|
+
break;
|
|
4756
|
+
}
|
|
4757
|
+
throw Error();
|
|
4758
|
+
case 6:
|
|
4753
4759
|
return _context7.abrupt("return", _pools);
|
|
4754
|
-
case 7:
|
|
4755
|
-
_context7.prev = 7;
|
|
4756
|
-
_context7.t0 = _context7["catch"](0);
|
|
4757
4760
|
case 9:
|
|
4761
|
+
_context7.prev = 9;
|
|
4762
|
+
_context7.t0 = _context7["catch"](0);
|
|
4763
|
+
case 11:
|
|
4758
4764
|
if (perPage) {
|
|
4759
4765
|
DEFAULT_PAGE_LIMIT = Math.min(perPage, 500);
|
|
4760
4766
|
}
|
|
4761
|
-
_context7.next =
|
|
4767
|
+
_context7.next = 14;
|
|
4762
4768
|
return getTotalPools();
|
|
4763
|
-
case
|
|
4769
|
+
case 14:
|
|
4764
4770
|
totalPools = _context7.sent;
|
|
4765
4771
|
pages = Math.ceil(totalPools / DEFAULT_PAGE_LIMIT);
|
|
4766
|
-
_context7.next =
|
|
4772
|
+
_context7.next = 18;
|
|
4767
4773
|
return Promise.all([].concat(Array(pages)).fill(0).map(function (_, i) {
|
|
4768
4774
|
return getRefPools(i + 1);
|
|
4769
4775
|
}));
|
|
4770
|
-
case
|
|
4776
|
+
case 18:
|
|
4771
4777
|
pools = _context7.sent.flat();
|
|
4772
4778
|
return _context7.abrupt("return", {
|
|
4773
4779
|
simplePools: pools.filter(function (p) {
|
|
@@ -4780,12 +4786,12 @@ var fetchAllPools = /*#__PURE__*/function () {
|
|
|
4780
4786
|
return p.pool_kind && p.pool_kind === 'RATED_SWAP';
|
|
4781
4787
|
})
|
|
4782
4788
|
});
|
|
4783
|
-
case
|
|
4789
|
+
case 20:
|
|
4784
4790
|
case "end":
|
|
4785
4791
|
return _context7.stop();
|
|
4786
4792
|
}
|
|
4787
4793
|
}
|
|
4788
|
-
}, _callee7, null, [[0,
|
|
4794
|
+
}, _callee7, null, [[0, 9]]);
|
|
4789
4795
|
}));
|
|
4790
4796
|
return function fetchAllPools(_x8) {
|
|
4791
4797
|
return _ref9.apply(this, arguments);
|