@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
|
@@ -4736,24 +4736,30 @@
|
|
|
4736
4736
|
});
|
|
4737
4737
|
case 3:
|
|
4738
4738
|
_pools = _context7.sent;
|
|
4739
|
+
if (!(_pools.code !== 0 || !_pools.simplePools)) {
|
|
4740
|
+
_context7.next = 6;
|
|
4741
|
+
break;
|
|
4742
|
+
}
|
|
4743
|
+
throw Error();
|
|
4744
|
+
case 6:
|
|
4739
4745
|
return _context7.abrupt("return", _pools);
|
|
4740
|
-
case 7:
|
|
4741
|
-
_context7.prev = 7;
|
|
4742
|
-
_context7.t0 = _context7["catch"](0);
|
|
4743
4746
|
case 9:
|
|
4747
|
+
_context7.prev = 9;
|
|
4748
|
+
_context7.t0 = _context7["catch"](0);
|
|
4749
|
+
case 11:
|
|
4744
4750
|
if (perPage) {
|
|
4745
4751
|
DEFAULT_PAGE_LIMIT = Math.min(perPage, 500);
|
|
4746
4752
|
}
|
|
4747
|
-
_context7.next =
|
|
4753
|
+
_context7.next = 14;
|
|
4748
4754
|
return getTotalPools();
|
|
4749
|
-
case
|
|
4755
|
+
case 14:
|
|
4750
4756
|
totalPools = _context7.sent;
|
|
4751
4757
|
pages = Math.ceil(totalPools / DEFAULT_PAGE_LIMIT);
|
|
4752
|
-
_context7.next =
|
|
4758
|
+
_context7.next = 18;
|
|
4753
4759
|
return Promise.all([].concat(Array(pages)).fill(0).map(function (_, i) {
|
|
4754
4760
|
return getRefPools(i + 1);
|
|
4755
4761
|
}));
|
|
4756
|
-
case
|
|
4762
|
+
case 18:
|
|
4757
4763
|
pools = _context7.sent.flat();
|
|
4758
4764
|
return _context7.abrupt("return", {
|
|
4759
4765
|
simplePools: pools.filter(function (p) {
|
|
@@ -4766,12 +4772,12 @@
|
|
|
4766
4772
|
return p.pool_kind && p.pool_kind === 'RATED_SWAP';
|
|
4767
4773
|
})
|
|
4768
4774
|
});
|
|
4769
|
-
case
|
|
4775
|
+
case 20:
|
|
4770
4776
|
case "end":
|
|
4771
4777
|
return _context7.stop();
|
|
4772
4778
|
}
|
|
4773
4779
|
}
|
|
4774
|
-
}, _callee7, null, [[0,
|
|
4780
|
+
}, _callee7, null, [[0, 9]]);
|
|
4775
4781
|
}));
|
|
4776
4782
|
return function fetchAllPools(_x8) {
|
|
4777
4783
|
return _ref9.apply(this, arguments);
|