@shapeshiftoss/swapper 11.5.0 → 11.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/swappers/thorchain/constants.d.ts +2 -0
- package/dist/swappers/thorchain/constants.js +7 -0
- package/dist/swappers/thorchain/getThorTradeQuote/getTradeQuote.js +40 -26
- package/dist/swappers/thorchain/utils/estimateBuyAssetTradeFeeCrypto/estimateBuyAssetTradeFeeCrypto.d.ts +3 -0
- package/dist/swappers/thorchain/utils/{estimateTradeFee/estimateTradeFee.js → estimateBuyAssetTradeFeeCrypto/estimateBuyAssetTradeFeeCrypto.js} +13 -13
- package/dist/swappers/thorchain/utils/getLimit/getLimit.js +8 -6
- package/dist/swappers/zrx/zrxBuildTrade/zrxBuildTrade.js +14 -22
- package/package.json +1 -1
- package/dist/swappers/thorchain/utils/estimateTradeFee/estimateTradeFee.d.ts +0 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MINIMUM_USD_TRADE_AMOUNT = exports.RUNE_OUTBOUND_TRANSACTION_FEE_CRYPTO_HUMAN = void 0;
|
|
4
|
+
const bignumber_1 = require("../utils/bignumber");
|
|
5
|
+
// TODO: read from https://daemon.thorchain.shapeshift.com/lcd/thorchain/constants
|
|
6
|
+
exports.RUNE_OUTBOUND_TRANSACTION_FEE_CRYPTO_HUMAN = (0, bignumber_1.bn)('0.02');
|
|
7
|
+
exports.MINIMUM_USD_TRADE_AMOUNT = (0, bignumber_1.bn)(1);
|
|
@@ -5,17 +5,18 @@ const caip_1 = require("@shapeshiftoss/caip");
|
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const bignumber_1 = require("../../utils/bignumber");
|
|
7
7
|
const constants_1 = require("../../utils/constants");
|
|
8
|
+
const constants_2 = require("../constants");
|
|
8
9
|
const getThorTxData_1 = require("../utils/bitcoin/utils/getThorTxData");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
10
|
+
const constants_3 = require("../utils/constants");
|
|
11
|
+
const estimateBuyAssetTradeFeeCrypto_1 = require("../utils/estimateBuyAssetTradeFeeCrypto/estimateBuyAssetTradeFeeCrypto");
|
|
11
12
|
const getThorTxData_2 = require("../utils/ethereum/utils/getThorTxData");
|
|
12
13
|
const getTradeRate_1 = require("../utils/getTradeRate/getTradeRate");
|
|
13
14
|
const getUsdRate_1 = require("../utils/getUsdRate/getUsdRate");
|
|
15
|
+
const isRune_1 = require("../utils/isRune/isRune");
|
|
14
16
|
const getBtcTxFees_1 = require("../utils/txFeeHelpers/btcTxFees/getBtcTxFees");
|
|
15
17
|
const getEthTxFees_1 = require("../utils/txFeeHelpers/ethTxFees/getEthTxFees");
|
|
16
|
-
const MINIMUM_USD_TRADE_AMOUNT = (0, bignumber_1.bn)(1);
|
|
17
18
|
const getThorTradeQuote = async ({ deps, input }) => {
|
|
18
|
-
const { sellAsset, buyAsset, sellAmount, bip44Params, chainId, receiveAddress } = input;
|
|
19
|
+
const { sellAsset, buyAsset, sellAmount: sellAmountCryptoPrecision, bip44Params, chainId, receiveAddress, } = input;
|
|
19
20
|
if (!bip44Params) {
|
|
20
21
|
throw new Error('bip44Params required in getThorTradeQuote');
|
|
21
22
|
}
|
|
@@ -27,28 +28,41 @@ const getThorTradeQuote = async ({ deps, input }) => {
|
|
|
27
28
|
code: api_1.SwapErrorTypes.UNSUPPORTED_CHAIN,
|
|
28
29
|
details: { chainId },
|
|
29
30
|
});
|
|
30
|
-
const rate = await (0, getTradeRate_1.getTradeRate)(sellAsset, buyAsset.assetId,
|
|
31
|
-
const
|
|
32
|
-
const
|
|
31
|
+
const rate = await (0, getTradeRate_1.getTradeRate)(sellAsset, buyAsset.assetId, sellAmountCryptoPrecision, deps);
|
|
32
|
+
const buyAmountCryptoPrecision = (0, bignumber_1.toBaseUnit)((0, bignumber_1.bnOrZero)((0, bignumber_1.fromBaseUnit)(sellAmountCryptoPrecision, sellAsset.precision)).times(rate), buyAsset.precision);
|
|
33
|
+
const estimatedBuyAssetTradeFeeCryptoHuman = await (0, estimateBuyAssetTradeFeeCrypto_1.estimateBuyAssetTradeFeeCrypto)(deps, buyAsset);
|
|
33
34
|
const buyAssetUsdRate = await (0, getUsdRate_1.getUsdRate)({ deps, input: { assetId: buyAsset.assetId } });
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
35
|
+
const sellAssetUsdRate = await (0, getUsdRate_1.getUsdRate)({ deps, input: { assetId: sellAsset.assetId } });
|
|
36
|
+
const estimatedBuyAssetTradeFeeUsd = (0, bignumber_1.bn)(buyAssetUsdRate)
|
|
37
|
+
.times(estimatedBuyAssetTradeFeeCryptoHuman)
|
|
38
|
+
.toString();
|
|
39
|
+
const buyAssetTradeFeeUsdOrMinimum = constants_2.MINIMUM_USD_TRADE_AMOUNT.gt(estimatedBuyAssetTradeFeeUsd)
|
|
40
|
+
? constants_2.MINIMUM_USD_TRADE_AMOUNT.toString()
|
|
41
|
+
: estimatedBuyAssetTradeFeeUsd;
|
|
42
|
+
const sellAssetTradeFeeCryptoHuman = (() => {
|
|
43
|
+
// The 1$ minimum doesn't apply for swaps to RUNE, use OutboundTransactionFee in human value instead
|
|
44
|
+
if ((0, isRune_1.isRune)(buyAsset === null || buyAsset === void 0 ? void 0 : buyAsset.assetId))
|
|
45
|
+
return constants_2.RUNE_OUTBOUND_TRANSACTION_FEE_CRYPTO_HUMAN;
|
|
46
|
+
return (0, bignumber_1.bnOrZero)(buyAssetTradeFeeUsdOrMinimum).div(sellAssetUsdRate);
|
|
47
|
+
})();
|
|
39
48
|
// minimum is tradeFee padded by an amount to be sure they get something back
|
|
40
49
|
// usually it will be slightly more than the amount because sellAssetTradeFee is already a high estimate
|
|
41
|
-
const
|
|
50
|
+
const minimumCryptoHuman = (0, bignumber_1.bnOrZero)(sellAssetTradeFeeCryptoHuman)
|
|
51
|
+
.times(constants_3.THOR_MINIMUM_PADDING)
|
|
52
|
+
.toString();
|
|
53
|
+
const buyAssetTradeFeeUsdOrDefault = (0, isRune_1.isRune)(buyAsset === null || buyAsset === void 0 ? void 0 : buyAsset.assetId)
|
|
54
|
+
? (0, bignumber_1.bn)(buyAssetUsdRate).times(constants_2.RUNE_OUTBOUND_TRANSACTION_FEE_CRYPTO_HUMAN).toString()
|
|
55
|
+
: buyAssetTradeFeeUsdOrMinimum;
|
|
42
56
|
const commonQuoteFields = {
|
|
43
57
|
rate,
|
|
44
|
-
maximum:
|
|
45
|
-
sellAmount,
|
|
46
|
-
buyAmount,
|
|
58
|
+
maximum: constants_3.MAX_THORCHAIN_TRADE,
|
|
59
|
+
sellAmount: sellAmountCryptoPrecision,
|
|
60
|
+
buyAmount: buyAmountCryptoPrecision,
|
|
47
61
|
sources: [{ name: 'thorchain', proportion: '1' }],
|
|
48
62
|
buyAsset,
|
|
49
63
|
sellAsset,
|
|
50
64
|
bip44Params,
|
|
51
|
-
minimum,
|
|
65
|
+
minimum: minimumCryptoHuman,
|
|
52
66
|
};
|
|
53
67
|
const { chainNamespace } = (0, caip_1.fromAssetId)(sellAsset.assetId);
|
|
54
68
|
switch (chainNamespace) {
|
|
@@ -58,15 +72,15 @@ const getThorTradeQuote = async ({ deps, input }) => {
|
|
|
58
72
|
deps,
|
|
59
73
|
sellAsset,
|
|
60
74
|
buyAsset,
|
|
61
|
-
sellAmount,
|
|
75
|
+
sellAmount: sellAmountCryptoPrecision,
|
|
62
76
|
slippageTolerance: constants_1.DEFAULT_SLIPPAGE,
|
|
63
77
|
destinationAddress: receiveAddress,
|
|
64
|
-
buyAssetTradeFeeUsd,
|
|
78
|
+
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrMinimum,
|
|
65
79
|
});
|
|
66
80
|
const feeData = await (0, getEthTxFees_1.getEthTxFees)({
|
|
67
81
|
adapterManager: deps.adapterManager,
|
|
68
82
|
sellAssetReference,
|
|
69
|
-
buyAssetTradeFeeUsd,
|
|
83
|
+
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrMinimum,
|
|
70
84
|
});
|
|
71
85
|
return {
|
|
72
86
|
...commonQuoteFields,
|
|
@@ -80,19 +94,19 @@ const getThorTradeQuote = async ({ deps, input }) => {
|
|
|
80
94
|
deps,
|
|
81
95
|
sellAsset,
|
|
82
96
|
buyAsset,
|
|
83
|
-
sellAmount,
|
|
97
|
+
sellAmount: sellAmountCryptoPrecision,
|
|
84
98
|
slippageTolerance: constants_1.DEFAULT_SLIPPAGE,
|
|
85
99
|
destinationAddress: receiveAddress,
|
|
86
100
|
xpub: input.xpub,
|
|
87
|
-
buyAssetTradeFeeUsd,
|
|
101
|
+
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrMinimum,
|
|
88
102
|
});
|
|
89
103
|
const feeData = await (0, getBtcTxFees_1.getBtcTxFees)({
|
|
90
|
-
sellAmount,
|
|
104
|
+
sellAmount: sellAmountCryptoPrecision,
|
|
91
105
|
vault,
|
|
92
106
|
opReturnData,
|
|
93
107
|
pubkey,
|
|
94
108
|
sellAdapter: sellAdapter,
|
|
95
|
-
buyAssetTradeFeeUsd,
|
|
109
|
+
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrMinimum,
|
|
96
110
|
});
|
|
97
111
|
return {
|
|
98
112
|
...commonQuoteFields,
|
|
@@ -109,8 +123,8 @@ const getThorTradeQuote = async ({ deps, input }) => {
|
|
|
109
123
|
feeData: {
|
|
110
124
|
fee: feeData.fast.txFee,
|
|
111
125
|
networkFee: feeData.fast.txFee,
|
|
112
|
-
tradeFee:
|
|
113
|
-
buyAssetTradeFeeUsd,
|
|
126
|
+
tradeFee: buyAssetTradeFeeUsdOrDefault,
|
|
127
|
+
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrDefault,
|
|
114
128
|
sellAssetTradeFeeUsd: '0',
|
|
115
129
|
chainSpecific: { estimatedGas: feeData.fast.chainSpecific.gasLimit },
|
|
116
130
|
},
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.estimateBuyAssetTradeFeeCrypto = void 0;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const api_1 = require("../../../../api");
|
|
6
|
-
const constants_1 = require("
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const constants_2 = require("../constants");
|
|
7
8
|
const getPriceRatio_1 = require("../getPriceRatio/getPriceRatio");
|
|
8
9
|
const isRune_1 = require("../isRune/isRune");
|
|
9
10
|
const thorService_1 = require("../thorService");
|
|
10
|
-
|
|
11
|
-
const estimateTradeFee = async (deps, buyAsset) => {
|
|
11
|
+
const estimateBuyAssetTradeFeeCrypto = async (deps, buyAsset) => {
|
|
12
12
|
if ((0, isRune_1.isRune)(buyAsset.assetId)) {
|
|
13
|
-
return
|
|
13
|
+
return constants_1.RUNE_OUTBOUND_TRANSACTION_FEE_CRYPTO_HUMAN.toString();
|
|
14
14
|
}
|
|
15
15
|
const thorId = caip_1.adapters.assetIdToPoolAssetId({ assetId: buyAsset.assetId });
|
|
16
16
|
if (!thorId)
|
|
17
|
-
throw new api_1.SwapError('[
|
|
17
|
+
throw new api_1.SwapError('[estimateBuyAssetTradeFeeCrypto] - undefined thorId for given buyAssetId', {
|
|
18
18
|
code: api_1.SwapErrorTypes.VALIDATION_FAILED,
|
|
19
19
|
details: { buyAssetId: buyAsset.assetId },
|
|
20
20
|
});
|
|
@@ -22,7 +22,7 @@ const estimateTradeFee = async (deps, buyAsset) => {
|
|
|
22
22
|
const { data: inboundAddresses } = await thorService_1.thorService.get(`${deps.daemonUrl}/lcd/thorchain/inbound_addresses`);
|
|
23
23
|
const inboundInfo = inboundAddresses.find((inbound) => inbound.chain === thorPoolChainId);
|
|
24
24
|
if (!inboundInfo)
|
|
25
|
-
throw new api_1.SwapError('[
|
|
25
|
+
throw new api_1.SwapError('[estimateBuyAssetTradeFeeCrypto] - unable to locate inbound pool info', {
|
|
26
26
|
code: api_1.SwapErrorTypes.VALIDATION_FAILED,
|
|
27
27
|
details: { thorPoolChainId },
|
|
28
28
|
});
|
|
@@ -30,13 +30,13 @@ const estimateTradeFee = async (deps, buyAsset) => {
|
|
|
30
30
|
const { chainId: buyChainId } = (0, caip_1.fromAssetId)(buyAsset.assetId);
|
|
31
31
|
const buyAdapter = deps.adapterManager.get(buyChainId);
|
|
32
32
|
if (!buyAdapter)
|
|
33
|
-
throw new api_1.SwapError('[
|
|
33
|
+
throw new api_1.SwapError('[estimateBuyAssetTradeFeeCrypto] - unable to get buy asset adapter', {
|
|
34
34
|
code: api_1.SwapErrorTypes.VALIDATION_FAILED,
|
|
35
35
|
details: { buyChainId },
|
|
36
36
|
});
|
|
37
37
|
const buyFeeAssetId = buyAdapter.getFeeAssetId();
|
|
38
38
|
if (!buyFeeAssetId)
|
|
39
|
-
throw new api_1.SwapError('[
|
|
39
|
+
throw new api_1.SwapError('[estimateBuyAssetTradeFeeCrypto] - no fee assetId', {
|
|
40
40
|
code: api_1.SwapErrorTypes.VALIDATION_FAILED,
|
|
41
41
|
details: { buyAssetId: buyAsset.assetId },
|
|
42
42
|
});
|
|
@@ -46,11 +46,11 @@ const estimateTradeFee = async (deps, buyAsset) => {
|
|
|
46
46
|
buyAssetId: buyFeeAssetId,
|
|
47
47
|
})
|
|
48
48
|
: '1';
|
|
49
|
-
if (!
|
|
50
|
-
throw new api_1.SwapError('[
|
|
49
|
+
if (!constants_2.THOR_TRADE_FEE_MULTIPLIERS[buyChainId])
|
|
50
|
+
throw new api_1.SwapError('[estimateBuyAssetTradeFeeCrypto] - no trade fee multiplier', {
|
|
51
51
|
code: api_1.SwapErrorTypes.VALIDATION_FAILED,
|
|
52
52
|
details: { buyChainId },
|
|
53
53
|
});
|
|
54
|
-
return
|
|
54
|
+
return constants_2.THOR_TRADE_FEE_MULTIPLIERS[buyChainId].times(buyFeeAssetRatio).times(gasRate).toString();
|
|
55
55
|
};
|
|
56
|
-
exports.
|
|
56
|
+
exports.estimateBuyAssetTradeFeeCrypto = estimateBuyAssetTradeFeeCrypto;
|
|
@@ -5,19 +5,21 @@ const api_1 = require("../../../../api");
|
|
|
5
5
|
const bignumber_1 = require("../../../utils/bignumber");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const getTradeRate_1 = require("../getTradeRate/getTradeRate");
|
|
8
|
+
const getUsdRate_1 = require("../getUsdRate/getUsdRate");
|
|
8
9
|
const getLimit = async ({ sellAsset, buyAsset, sellAmount, deps, slippageTolerance, buyAssetTradeFeeUsd, }) => {
|
|
9
10
|
const tradeRate = await (0, getTradeRate_1.getTradeRate)(sellAsset, buyAsset.assetId, sellAmount, deps);
|
|
10
|
-
const
|
|
11
|
+
const buyAssetUsdRate = await (0, getUsdRate_1.getUsdRate)({ deps, input: { assetId: buyAsset.assetId } });
|
|
12
|
+
const expectedBuyAmountCryptoPrecision8 = (0, bignumber_1.toBaseUnit)((0, bignumber_1.fromBaseUnit)((0, bignumber_1.bnOrZero)(sellAmount).times(tradeRate), sellAsset.precision), constants_1.THORCHAIN_FIXED_PRECISION);
|
|
11
13
|
const isValidSlippageRange = (0, bignumber_1.bnOrZero)(slippageTolerance).gte(0) && (0, bignumber_1.bnOrZero)(slippageTolerance).lte(1);
|
|
12
|
-
if ((0, bignumber_1.bnOrZero)(
|
|
14
|
+
if ((0, bignumber_1.bnOrZero)(expectedBuyAmountCryptoPrecision8).lt(0) || !isValidSlippageRange)
|
|
13
15
|
throw new api_1.SwapError('[getThorTxInfo]: bad expected buy amount or bad slippage tolerance', {
|
|
14
16
|
code: api_1.SwapErrorTypes.BUILD_TRADE_FAILED,
|
|
15
|
-
details: {
|
|
17
|
+
details: { expectedBuyAmountCryptoPrecision8, slippageTolerance },
|
|
16
18
|
});
|
|
17
|
-
const
|
|
18
|
-
return (0, bignumber_1.bnOrZero)(
|
|
19
|
+
const tradeFeeCryptoPrecision8 = (0, bignumber_1.toBaseUnit)((0, bignumber_1.bnOrZero)(buyAssetTradeFeeUsd).div(buyAssetUsdRate), constants_1.THORCHAIN_FIXED_PRECISION);
|
|
20
|
+
return (0, bignumber_1.bnOrZero)(expectedBuyAmountCryptoPrecision8)
|
|
19
21
|
.times((0, bignumber_1.bn)(1).minus(slippageTolerance))
|
|
20
|
-
.minus((0, bignumber_1.bnOrZero)(
|
|
22
|
+
.minus((0, bignumber_1.bnOrZero)(tradeFeeCryptoPrecision8))
|
|
21
23
|
.decimalPlaces(0)
|
|
22
24
|
.toString();
|
|
23
25
|
};
|
|
@@ -36,7 +36,7 @@ const constants_2 = require("../utils/constants");
|
|
|
36
36
|
const helpers_2 = require("../utils/helpers/helpers");
|
|
37
37
|
const zrxService_1 = require("../utils/zrxService");
|
|
38
38
|
async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
39
|
-
var _a
|
|
39
|
+
var _a;
|
|
40
40
|
const { sellAsset, buyAsset, sellAmount, slippage, bip44Params, receiveAddress } = input;
|
|
41
41
|
try {
|
|
42
42
|
const { assetReference: buyAssetErc20Address, assetNamespace: buyAssetNamespace } = (0, caip_1.fromAssetId)(buyAsset.assetId);
|
|
@@ -92,6 +92,18 @@ async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
|
92
92
|
const { data } = quoteResponse;
|
|
93
93
|
const estimatedGas = (0, bignumber_1.bnOrZero)(data.gas || 0);
|
|
94
94
|
const networkFee = (0, bignumber_1.bnOrZero)(estimatedGas).multipliedBy((0, bignumber_1.bnOrZero)(data.gasPrice)).toString();
|
|
95
|
+
const allowanceRequired = await (0, helpers_1.getAllowanceRequired)({
|
|
96
|
+
adapter,
|
|
97
|
+
sellAsset,
|
|
98
|
+
allowanceContract: data.allowanceTarget,
|
|
99
|
+
receiveAddress,
|
|
100
|
+
sellAmount: data.sellAmount,
|
|
101
|
+
web3,
|
|
102
|
+
erc20AllowanceAbi: erc20Allowance_abi_1.erc20AllowanceAbi,
|
|
103
|
+
});
|
|
104
|
+
const approvalFee = (0, bignumber_1.bnOrZero)(constants_1.APPROVAL_GAS_LIMIT)
|
|
105
|
+
.multipliedBy((0, bignumber_1.bnOrZero)(data.gasPrice))
|
|
106
|
+
.toString();
|
|
95
107
|
const trade = {
|
|
96
108
|
sellAsset,
|
|
97
109
|
buyAsset,
|
|
@@ -104,6 +116,7 @@ async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
|
104
116
|
chainSpecific: {
|
|
105
117
|
estimatedGas: estimatedGas.toString(),
|
|
106
118
|
gasPrice: data.gasPrice,
|
|
119
|
+
approvalFee: allowanceRequired.gt(0) ? approvalFee : undefined,
|
|
107
120
|
},
|
|
108
121
|
tradeFee: '0',
|
|
109
122
|
networkFee,
|
|
@@ -115,27 +128,6 @@ async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
|
115
128
|
buyAmount: data.buyAmount,
|
|
116
129
|
sources: ((_a = data.sources) === null || _a === void 0 ? void 0 : _a.filter((s) => parseFloat(s.proportion) > 0)) || constants_2.DEFAULT_SOURCE,
|
|
117
130
|
};
|
|
118
|
-
const allowanceRequired = await (0, helpers_1.getAllowanceRequired)({
|
|
119
|
-
adapter,
|
|
120
|
-
sellAsset,
|
|
121
|
-
allowanceContract: data.allowanceTarget,
|
|
122
|
-
receiveAddress,
|
|
123
|
-
sellAmount: data.sellAmount,
|
|
124
|
-
web3,
|
|
125
|
-
erc20AllowanceAbi: erc20Allowance_abi_1.erc20AllowanceAbi,
|
|
126
|
-
});
|
|
127
|
-
if (allowanceRequired) {
|
|
128
|
-
trade.feeData = {
|
|
129
|
-
fee: ((_b = trade.feeData) === null || _b === void 0 ? void 0 : _b.fee) || '0',
|
|
130
|
-
chainSpecific: {
|
|
131
|
-
...(_c = trade.feeData) === null || _c === void 0 ? void 0 : _c.chainSpecific,
|
|
132
|
-
approvalFee: (0, bignumber_1.bnOrZero)(constants_1.APPROVAL_GAS_LIMIT)
|
|
133
|
-
.multipliedBy((0, bignumber_1.bnOrZero)(data.gasPrice))
|
|
134
|
-
.toString(),
|
|
135
|
-
},
|
|
136
|
-
tradeFee: '0',
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
131
|
return trade;
|
|
140
132
|
}
|
|
141
133
|
catch (e) {
|
package/package.json
CHANGED