@dhedge/v2-sdk 1.5.1 → 1.5.2
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/services/toros/easySwapper.d.ts +1 -1
- package/dist/v2-sdk.cjs.development.js +22 -11
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +22 -11
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/services/toros/easySwapper.ts +12 -2
package/dist/v2-sdk.esm.js
CHANGED
|
@@ -10723,13 +10723,13 @@ function _isPool() {
|
|
|
10723
10723
|
return _isPool.apply(this, arguments);
|
|
10724
10724
|
}
|
|
10725
10725
|
|
|
10726
|
-
function getPoolDepositAsset(_x, _x2) {
|
|
10726
|
+
function getPoolDepositAsset(_x, _x2, _x3) {
|
|
10727
10727
|
return _getPoolDepositAsset.apply(this, arguments);
|
|
10728
10728
|
}
|
|
10729
10729
|
|
|
10730
10730
|
function _getPoolDepositAsset() {
|
|
10731
|
-
_getPoolDepositAsset = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, poolAddress) {
|
|
10732
|
-
var _composition$find;
|
|
10731
|
+
_getPoolDepositAsset = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, poolAddress, investAsset) {
|
|
10732
|
+
var _composition$find, _composition$find2;
|
|
10733
10733
|
|
|
10734
10734
|
var torosPool, composition;
|
|
10735
10735
|
return runtime_1.wrap(function _callee$(_context) {
|
|
@@ -10746,11 +10746,22 @@ function _getPoolDepositAsset() {
|
|
|
10746
10746
|
|
|
10747
10747
|
case 5:
|
|
10748
10748
|
composition = _context.sent;
|
|
10749
|
-
|
|
10749
|
+
|
|
10750
|
+
if (!((_composition$find = composition.find(function (e) {
|
|
10751
|
+
return e.asset.toLowerCase() === investAsset.toLowerCase();
|
|
10752
|
+
})) != null && _composition$find.isDeposit)) {
|
|
10753
|
+
_context.next = 8;
|
|
10754
|
+
break;
|
|
10755
|
+
}
|
|
10756
|
+
|
|
10757
|
+
return _context.abrupt("return", investAsset);
|
|
10758
|
+
|
|
10759
|
+
case 8:
|
|
10760
|
+
return _context.abrupt("return", (_composition$find2 = composition.find(function (e) {
|
|
10750
10761
|
return e.isDeposit;
|
|
10751
|
-
})) == null ? void 0 : _composition$
|
|
10762
|
+
})) == null ? void 0 : _composition$find2.asset);
|
|
10752
10763
|
|
|
10753
|
-
case
|
|
10764
|
+
case 9:
|
|
10754
10765
|
case "end":
|
|
10755
10766
|
return _context.stop();
|
|
10756
10767
|
}
|
|
@@ -10760,7 +10771,7 @@ function _getPoolDepositAsset() {
|
|
|
10760
10771
|
return _getPoolDepositAsset.apply(this, arguments);
|
|
10761
10772
|
}
|
|
10762
10773
|
|
|
10763
|
-
function getTorosPoolTokenPrice(
|
|
10774
|
+
function getTorosPoolTokenPrice(_x4, _x5) {
|
|
10764
10775
|
return _getTorosPoolTokenPrice.apply(this, arguments);
|
|
10765
10776
|
}
|
|
10766
10777
|
|
|
@@ -10792,7 +10803,7 @@ function _getTorosPoolTokenPrice() {
|
|
|
10792
10803
|
return _getTorosPoolTokenPrice.apply(this, arguments);
|
|
10793
10804
|
}
|
|
10794
10805
|
|
|
10795
|
-
function getEasySwapperDepositQuote(
|
|
10806
|
+
function getEasySwapperDepositQuote(_x6, _x7, _x8, _x9, _x10) {
|
|
10796
10807
|
return _getEasySwapperDepositQuote.apply(this, arguments);
|
|
10797
10808
|
}
|
|
10798
10809
|
|
|
@@ -10820,7 +10831,7 @@ function _getEasySwapperDepositQuote() {
|
|
|
10820
10831
|
return _getEasySwapperDepositQuote.apply(this, arguments);
|
|
10821
10832
|
}
|
|
10822
10833
|
|
|
10823
|
-
function getEasySwapperWithdrawalQuote(
|
|
10834
|
+
function getEasySwapperWithdrawalQuote(_x11, _x12, _x13, _x14) {
|
|
10824
10835
|
return _getEasySwapperWithdrawalQuote.apply(this, arguments);
|
|
10825
10836
|
}
|
|
10826
10837
|
|
|
@@ -10852,7 +10863,7 @@ function _getEasySwapperWithdrawalQuote() {
|
|
|
10852
10863
|
return _getEasySwapperWithdrawalQuote.apply(this, arguments);
|
|
10853
10864
|
}
|
|
10854
10865
|
|
|
10855
|
-
function getEasySwapperTxData(
|
|
10866
|
+
function getEasySwapperTxData(_x15, _x16, _x17, _x18, _x19) {
|
|
10856
10867
|
return _getEasySwapperTxData.apply(this, arguments);
|
|
10857
10868
|
}
|
|
10858
10869
|
|
|
@@ -10887,7 +10898,7 @@ function _getEasySwapperTxData() {
|
|
|
10887
10898
|
|
|
10888
10899
|
case 12:
|
|
10889
10900
|
_context5.next = 14;
|
|
10890
|
-
return getPoolDepositAsset(pool, torosAsset);
|
|
10901
|
+
return getPoolDepositAsset(pool, torosAsset, investAsset);
|
|
10891
10902
|
|
|
10892
10903
|
case 14:
|
|
10893
10904
|
depositAsset = _context5.sent;
|