@ref-finance/ref-sdk 1.3.12 → 1.4.1
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 -13
- 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 -13
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +19 -13
- 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
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
REF_FI_CONTRACT_ID: 'v2.ref-finance.near',
|
|
39
39
|
REF_TOKEN_ID: 'token.v2.ref-finance.near',
|
|
40
40
|
indexerUrl: indexerUrl || 'https://indexer.ref.finance',
|
|
41
|
-
explorerUrl: 'https://
|
|
41
|
+
explorerUrl: 'https://nearblocks.io',
|
|
42
42
|
REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-labs.near'
|
|
43
43
|
};
|
|
44
44
|
case 'testnet':
|
|
@@ -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);
|
|
@@ -5186,7 +5192,7 @@
|
|
|
5186
5192
|
}(), [tokens]);
|
|
5187
5193
|
React.useEffect(function () {
|
|
5188
5194
|
// Initializes token balances
|
|
5189
|
-
// Called in
|
|
5195
|
+
// Called in 15 seconds intervals
|
|
5190
5196
|
var initTokenBalances = /*#__PURE__*/function () {
|
|
5191
5197
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
5192
5198
|
var validTokens, ids;
|
|
@@ -5220,7 +5226,7 @@
|
|
|
5220
5226
|
};
|
|
5221
5227
|
}();
|
|
5222
5228
|
initTokenBalances();
|
|
5223
|
-
var interval = setInterval(initTokenBalances,
|
|
5229
|
+
var interval = setInterval(initTokenBalances, 15000);
|
|
5224
5230
|
return function () {
|
|
5225
5231
|
return clearInterval(interval);
|
|
5226
5232
|
};
|
|
@@ -6451,7 +6457,7 @@
|
|
|
6451
6457
|
style: {
|
|
6452
6458
|
color: primary
|
|
6453
6459
|
}
|
|
6454
|
-
}, (state === null || state === undefined) && React__default.createElement("p", null, "Waiting for confirmation"), state === '
|
|
6460
|
+
}, (state === null || state === undefined) && React__default.createElement("p", null, "Waiting for confirmation"), state === 'success' && tx && React__default.createElement("a", {
|
|
6455
6461
|
className: "text-primary font-semibold",
|
|
6456
6462
|
href: exports.config.explorerUrl + "/txns/" + tx,
|
|
6457
6463
|
target: "_blank",
|