@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import { Pool } from "../..";
|
|
3
|
-
export declare function getPoolDepositAsset(pool: Pool, poolAddress: string): Promise<string | undefined>;
|
|
3
|
+
export declare function getPoolDepositAsset(pool: Pool, poolAddress: string, investAsset: string): Promise<string | undefined>;
|
|
4
4
|
export declare function getTorosPoolTokenPrice(pool: Pool, poolAddress: string): Promise<ethers.BigNumber>;
|
|
5
5
|
export declare function getEasySwapperDepositQuote(pool: Pool, torosAsset: string, investAsset: string, depositAsset: string, amountIn: ethers.BigNumber): Promise<ethers.BigNumber>;
|
|
6
6
|
export declare function getEasySwapperWithdrawalQuote(pool: Pool, torosAsset: string, investAsset: string, amountIn: ethers.BigNumber): Promise<ethers.BigNumber>;
|
|
@@ -10722,13 +10722,13 @@ function _isPool() {
|
|
|
10722
10722
|
return _isPool.apply(this, arguments);
|
|
10723
10723
|
}
|
|
10724
10724
|
|
|
10725
|
-
function getPoolDepositAsset(_x, _x2) {
|
|
10725
|
+
function getPoolDepositAsset(_x, _x2, _x3) {
|
|
10726
10726
|
return _getPoolDepositAsset.apply(this, arguments);
|
|
10727
10727
|
}
|
|
10728
10728
|
|
|
10729
10729
|
function _getPoolDepositAsset() {
|
|
10730
|
-
_getPoolDepositAsset = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, poolAddress) {
|
|
10731
|
-
var _composition$find;
|
|
10730
|
+
_getPoolDepositAsset = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, poolAddress, investAsset) {
|
|
10731
|
+
var _composition$find, _composition$find2;
|
|
10732
10732
|
|
|
10733
10733
|
var torosPool, composition;
|
|
10734
10734
|
return runtime_1.wrap(function _callee$(_context) {
|
|
@@ -10745,11 +10745,22 @@ function _getPoolDepositAsset() {
|
|
|
10745
10745
|
|
|
10746
10746
|
case 5:
|
|
10747
10747
|
composition = _context.sent;
|
|
10748
|
-
|
|
10748
|
+
|
|
10749
|
+
if (!((_composition$find = composition.find(function (e) {
|
|
10750
|
+
return e.asset.toLowerCase() === investAsset.toLowerCase();
|
|
10751
|
+
})) != null && _composition$find.isDeposit)) {
|
|
10752
|
+
_context.next = 8;
|
|
10753
|
+
break;
|
|
10754
|
+
}
|
|
10755
|
+
|
|
10756
|
+
return _context.abrupt("return", investAsset);
|
|
10757
|
+
|
|
10758
|
+
case 8:
|
|
10759
|
+
return _context.abrupt("return", (_composition$find2 = composition.find(function (e) {
|
|
10749
10760
|
return e.isDeposit;
|
|
10750
|
-
})) == null ? void 0 : _composition$
|
|
10761
|
+
})) == null ? void 0 : _composition$find2.asset);
|
|
10751
10762
|
|
|
10752
|
-
case
|
|
10763
|
+
case 9:
|
|
10753
10764
|
case "end":
|
|
10754
10765
|
return _context.stop();
|
|
10755
10766
|
}
|
|
@@ -10759,7 +10770,7 @@ function _getPoolDepositAsset() {
|
|
|
10759
10770
|
return _getPoolDepositAsset.apply(this, arguments);
|
|
10760
10771
|
}
|
|
10761
10772
|
|
|
10762
|
-
function getTorosPoolTokenPrice(
|
|
10773
|
+
function getTorosPoolTokenPrice(_x4, _x5) {
|
|
10763
10774
|
return _getTorosPoolTokenPrice.apply(this, arguments);
|
|
10764
10775
|
}
|
|
10765
10776
|
|
|
@@ -10791,7 +10802,7 @@ function _getTorosPoolTokenPrice() {
|
|
|
10791
10802
|
return _getTorosPoolTokenPrice.apply(this, arguments);
|
|
10792
10803
|
}
|
|
10793
10804
|
|
|
10794
|
-
function getEasySwapperDepositQuote(
|
|
10805
|
+
function getEasySwapperDepositQuote(_x6, _x7, _x8, _x9, _x10) {
|
|
10795
10806
|
return _getEasySwapperDepositQuote.apply(this, arguments);
|
|
10796
10807
|
}
|
|
10797
10808
|
|
|
@@ -10819,7 +10830,7 @@ function _getEasySwapperDepositQuote() {
|
|
|
10819
10830
|
return _getEasySwapperDepositQuote.apply(this, arguments);
|
|
10820
10831
|
}
|
|
10821
10832
|
|
|
10822
|
-
function getEasySwapperWithdrawalQuote(
|
|
10833
|
+
function getEasySwapperWithdrawalQuote(_x11, _x12, _x13, _x14) {
|
|
10823
10834
|
return _getEasySwapperWithdrawalQuote.apply(this, arguments);
|
|
10824
10835
|
}
|
|
10825
10836
|
|
|
@@ -10851,7 +10862,7 @@ function _getEasySwapperWithdrawalQuote() {
|
|
|
10851
10862
|
return _getEasySwapperWithdrawalQuote.apply(this, arguments);
|
|
10852
10863
|
}
|
|
10853
10864
|
|
|
10854
|
-
function getEasySwapperTxData(
|
|
10865
|
+
function getEasySwapperTxData(_x15, _x16, _x17, _x18, _x19) {
|
|
10855
10866
|
return _getEasySwapperTxData.apply(this, arguments);
|
|
10856
10867
|
}
|
|
10857
10868
|
|
|
@@ -10886,7 +10897,7 @@ function _getEasySwapperTxData() {
|
|
|
10886
10897
|
|
|
10887
10898
|
case 12:
|
|
10888
10899
|
_context5.next = 14;
|
|
10889
|
-
return getPoolDepositAsset(pool, torosAsset);
|
|
10900
|
+
return getPoolDepositAsset(pool, torosAsset, investAsset);
|
|
10890
10901
|
|
|
10891
10902
|
case 14:
|
|
10892
10903
|
depositAsset = _context5.sent;
|