@shapeshiftoss/swapper 12.2.0 → 13.0.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/api.d.ts +0 -4
- package/dist/swappers/cow/cowBuildTrade/cowBuildTrade.js +0 -2
- package/dist/swappers/cow/getCowSwapTradeQuote/getCowSwapTradeQuote.js +0 -2
- package/dist/swappers/osmosis/OsmosisSwapper.js +0 -4
- package/dist/swappers/thorchain/getThorTradeQuote/getTradeQuote.js +0 -2
- package/dist/swappers/thorchain/utils/cosmos/cosmosTxData.js +2 -2
- package/dist/swappers/thorchain/utils/txFeeHelpers/btcTxFees/getBtcTxFees.js +0 -2
- package/dist/swappers/thorchain/utils/txFeeHelpers/ethTxFees/getEthTxFees.js +0 -2
- package/dist/swappers/utils/test-data/setupSwapQuote.js +0 -2
- package/dist/swappers/zrx/getZrxTradeQuote/getZrxTradeQuote.js +0 -2
- package/dist/swappers/zrx/utils/test-data/setupZrxSwapQuote.d.ts +0 -2
- package/dist/swappers/zrx/utils/test-data/setupZrxSwapQuote.js +0 -2
- package/dist/swappers/zrx/zrxBuildTrade/zrxBuildTrade.js +0 -2
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -62,10 +62,6 @@ export declare type QuoteFeeData<T extends ChainId> = {
|
|
|
62
62
|
networkFee: string;
|
|
63
63
|
buyAssetTradeFeeUsd: string;
|
|
64
64
|
sellAssetTradeFeeUsd?: string;
|
|
65
|
-
/** @deprecated Use networkFee instead */
|
|
66
|
-
fee: string;
|
|
67
|
-
/** @deprecated Use sellAssetTradeFeeUsd instead */
|
|
68
|
-
tradeFee: string;
|
|
69
65
|
} & ChainSpecificQuoteFeeData<T>;
|
|
70
66
|
export declare type ByPairInput = {
|
|
71
67
|
sellAssetId: AssetId;
|
|
@@ -79,13 +79,11 @@ async function cowBuildTrade(deps, input) {
|
|
|
79
79
|
const trade = {
|
|
80
80
|
rate,
|
|
81
81
|
feeData: {
|
|
82
|
-
fee: '0',
|
|
83
82
|
networkFee: '0',
|
|
84
83
|
chainSpecific: {
|
|
85
84
|
estimatedGas: feeData.chainSpecific.gasLimit,
|
|
86
85
|
gasPrice: feeData.chainSpecific.gasPrice,
|
|
87
86
|
},
|
|
88
|
-
tradeFee: '0',
|
|
89
87
|
buyAssetTradeFeeUsd: '0',
|
|
90
88
|
sellAssetTradeFeeUsd,
|
|
91
89
|
},
|
|
@@ -96,7 +96,6 @@ async function getCowSwapTradeQuote(deps, input) {
|
|
|
96
96
|
minimum,
|
|
97
97
|
maximum,
|
|
98
98
|
feeData: {
|
|
99
|
-
fee: '0',
|
|
100
99
|
networkFee: '0',
|
|
101
100
|
chainSpecific: {
|
|
102
101
|
estimatedGas: feeData.chainSpecific.gasLimit,
|
|
@@ -105,7 +104,6 @@ async function getCowSwapTradeQuote(deps, input) {
|
|
|
105
104
|
.multipliedBy((0, bignumber_1.bnOrZero)(feeData.chainSpecific.gasPrice))
|
|
106
105
|
.toString(),
|
|
107
106
|
},
|
|
108
|
-
tradeFee: '0',
|
|
109
107
|
buyAssetTradeFeeUsd: '0',
|
|
110
108
|
sellAssetTradeFeeUsd,
|
|
111
109
|
},
|
|
@@ -107,8 +107,6 @@ class OsmosisSwapper {
|
|
|
107
107
|
buyAmount,
|
|
108
108
|
buyAsset,
|
|
109
109
|
feeData: {
|
|
110
|
-
fee,
|
|
111
|
-
tradeFee: buyAssetTradeFeeUsd,
|
|
112
110
|
networkFee: fee,
|
|
113
111
|
sellAssetTradeFeeUsd: '0',
|
|
114
112
|
buyAssetTradeFeeUsd,
|
|
@@ -140,8 +138,6 @@ class OsmosisSwapper {
|
|
|
140
138
|
return {
|
|
141
139
|
buyAsset,
|
|
142
140
|
feeData: {
|
|
143
|
-
fee,
|
|
144
|
-
tradeFee: buyAssetTradeFeeUsd,
|
|
145
141
|
networkFee: fee,
|
|
146
142
|
sellAssetTradeFeeUsd: '0',
|
|
147
143
|
buyAssetTradeFeeUsd,
|
|
@@ -126,9 +126,7 @@ const getThorTradeQuote = async ({ deps, input }) => {
|
|
|
126
126
|
...commonQuoteFields,
|
|
127
127
|
allowanceContract: '0x0',
|
|
128
128
|
feeData: {
|
|
129
|
-
fee: feeData.fast.txFee,
|
|
130
129
|
networkFee: feeData.fast.txFee,
|
|
131
|
-
tradeFee: buyAssetTradeFeeUsdOrDefault,
|
|
132
130
|
buyAssetTradeFeeUsd: buyAssetTradeFeeUsdOrDefault,
|
|
133
131
|
sellAssetTradeFeeUsd: '0',
|
|
134
132
|
chainSpecific: { estimatedGas: feeData.fast.chainSpecific.gasLimit },
|
|
@@ -40,7 +40,7 @@ const cosmosTxData = async (input) => {
|
|
|
40
40
|
wallet,
|
|
41
41
|
memo,
|
|
42
42
|
gas: quote.feeData.chainSpecific.estimatedGas,
|
|
43
|
-
fee: quote.feeData.
|
|
43
|
+
fee: quote.feeData.networkFee,
|
|
44
44
|
});
|
|
45
45
|
return buildTxResponse.txToSign;
|
|
46
46
|
}
|
|
@@ -58,7 +58,7 @@ const cosmosTxData = async (input) => {
|
|
|
58
58
|
memo,
|
|
59
59
|
chainSpecific: {
|
|
60
60
|
gas: quote.feeData.chainSpecific.estimatedGas,
|
|
61
|
-
fee: quote.feeData.
|
|
61
|
+
fee: quote.feeData.networkFee,
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
return buildTxResponse.txToSign;
|
|
@@ -23,9 +23,7 @@ const getBtcTxFees = async ({ opReturnData, vault, sellAmount, sellAdapter, pubk
|
|
|
23
23
|
const networkFee = feeMultiplier.times(feeData.txFee).dp(0).toString();
|
|
24
24
|
const satsPerByte = feeMultiplier.times(feeData.chainSpecific.satoshiPerByte).dp(0).toString();
|
|
25
25
|
return {
|
|
26
|
-
fee: networkFee,
|
|
27
26
|
networkFee,
|
|
28
|
-
tradeFee: buyAssetTradeFeeUsd,
|
|
29
27
|
buyAssetTradeFeeUsd,
|
|
30
28
|
sellAssetTradeFeeUsd: '0',
|
|
31
29
|
chainSpecific: {
|
|
@@ -31,7 +31,6 @@ const getEthTxFees = async ({ adapterManager, sellAssetReference, buyAssetTradeF
|
|
|
31
31
|
};
|
|
32
32
|
const feeData = feeDataOptions['fast'];
|
|
33
33
|
return {
|
|
34
|
-
fee: feeData.txFee,
|
|
35
34
|
networkFee: feeData.txFee,
|
|
36
35
|
chainSpecific: {
|
|
37
36
|
estimatedGas: feeData.chainSpecific.gasLimit,
|
|
@@ -41,7 +40,6 @@ const getEthTxFees = async ({ adapterManager, sellAssetReference, buyAssetTradeF
|
|
|
41
40
|
.multipliedBy((0, bignumber_1.bnOrZero)(feeData.chainSpecific.gasPrice))
|
|
42
41
|
.toString(),
|
|
43
42
|
},
|
|
44
|
-
tradeFee: buyAssetTradeFeeUsd,
|
|
45
43
|
buyAssetTradeFeeUsd,
|
|
46
44
|
sellAssetTradeFeeUsd: '0',
|
|
47
45
|
};
|
|
@@ -58,13 +58,11 @@ async function getZrxTradeQuote(input) {
|
|
|
58
58
|
minimum,
|
|
59
59
|
maximum,
|
|
60
60
|
feeData: {
|
|
61
|
-
fee,
|
|
62
61
|
chainSpecific: {
|
|
63
62
|
estimatedGas: estimatedGas.toString(),
|
|
64
63
|
gasPrice,
|
|
65
64
|
approvalFee,
|
|
66
65
|
},
|
|
67
|
-
tradeFee: '0',
|
|
68
66
|
networkFee: fee,
|
|
69
67
|
buyAssetTradeFeeUsd: '0',
|
|
70
68
|
sellAssetTradeFeeUsd: '0',
|
|
@@ -26,9 +26,7 @@ export declare const setupExecuteTrade: () => {
|
|
|
26
26
|
depositAddress: string;
|
|
27
27
|
receiveAddress: string;
|
|
28
28
|
feeData: {
|
|
29
|
-
fee: string;
|
|
30
29
|
chainSpecific: {};
|
|
31
|
-
tradeFee: string;
|
|
32
30
|
buyAssetTradeFeeUsd: string;
|
|
33
31
|
sellAssetTradeFeeUsd: string;
|
|
34
32
|
networkFee: string;
|
|
@@ -112,13 +112,11 @@ async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
|
112
112
|
rate: data.price,
|
|
113
113
|
depositAddress: data.to,
|
|
114
114
|
feeData: {
|
|
115
|
-
fee: networkFee,
|
|
116
115
|
chainSpecific: {
|
|
117
116
|
estimatedGas: estimatedGas.toString(),
|
|
118
117
|
gasPrice: data.gasPrice,
|
|
119
118
|
approvalFee: approvalRequired ? approvalFee : undefined,
|
|
120
119
|
},
|
|
121
|
-
tradeFee: '0',
|
|
122
120
|
networkFee,
|
|
123
121
|
buyAssetTradeFeeUsd: '0',
|
|
124
122
|
sellAssetTradeFeeUsd: '0',
|
package/package.json
CHANGED