@shapeshiftoss/swapper 9.1.0 → 9.1.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/api.d.ts +0 -1
- package/dist/swappercli.js +0 -1
- package/dist/swappers/utils/test-data/setupSwapQuote.d.ts +0 -1
- package/dist/swappers/utils/test-data/setupSwapQuote.js +0 -1
- package/dist/swappers/zrx/utils/test-data/setupZrxSwapQuote.d.ts +0 -1
- package/dist/swappers/zrx/utils/test-data/setupZrxSwapQuote.js +0 -1
- package/dist/swappers/zrx/zrxBuildTrade/zrxBuildTrade.js +1 -3
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -85,7 +85,6 @@ declare type GetBtcTradeQuoteInput = CommonTradeInput & {
|
|
|
85
85
|
};
|
|
86
86
|
export declare type GetTradeQuoteInput = GetBtcTradeQuoteInput | GetEvmTradeQuoteInput | GetCosmosSdkTradeQuoteInput;
|
|
87
87
|
export declare type BuildTradeInput = GetTradeQuoteInput & {
|
|
88
|
-
buyAssetAccountNumber: number;
|
|
89
88
|
slippage?: string;
|
|
90
89
|
wallet: HDWallet;
|
|
91
90
|
};
|
package/dist/swappercli.js
CHANGED
|
@@ -137,7 +137,6 @@ const main = async () => {
|
|
|
137
137
|
sellAmount: sellAmountBase,
|
|
138
138
|
sellAsset,
|
|
139
139
|
sellAssetAccountNumber: 0,
|
|
140
|
-
buyAssetAccountNumber: 0,
|
|
141
140
|
receiveAddress: '0xc770eefad204b5180df6a14ee197d99d808ee52d'
|
|
142
141
|
});
|
|
143
142
|
const txid = await swapper.executeTrade({ trade, wallet });
|
|
@@ -37,7 +37,7 @@ const helpers_2 = require("../utils/helpers/helpers");
|
|
|
37
37
|
const zrxService_1 = require("../utils/zrxService");
|
|
38
38
|
async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
39
39
|
var _a, _b, _c;
|
|
40
|
-
const { sellAsset, buyAsset, sellAmount, slippage, sellAssetAccountNumber,
|
|
40
|
+
const { sellAsset, buyAsset, sellAmount, slippage, sellAssetAccountNumber, receiveAddress } = input;
|
|
41
41
|
try {
|
|
42
42
|
const { assetReference: buyAssetErc20Address, assetNamespace: buyAssetNamespace } = (0, caip_1.fromAssetId)(buyAsset.assetId);
|
|
43
43
|
const { assetReference: sellAssetErc20Address, assetNamespace: sellAssetNamespace } = (0, caip_1.fromAssetId)(sellAsset.assetId);
|
|
@@ -50,8 +50,6 @@ async function zrxBuildTrade({ adapter, web3 }, input) {
|
|
|
50
50
|
details: { chainId: sellAsset.chainId }
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
const bip44Params = adapter.buildBIP44Params({ accountNumber: Number(buyAssetAccountNumber) });
|
|
54
|
-
const receiveAddress = await adapter.getAddress({ wallet, bip44Params });
|
|
55
53
|
const slippagePercentage = slippage ? (0, bignumber_1.bnOrZero)(slippage).div(100).toString() : constants_1.DEFAULT_SLIPPAGE;
|
|
56
54
|
const baseUrl = (0, helpers_2.baseUrlFromChainId)(buyAsset.chainId);
|
|
57
55
|
const zrxService = (0, zrxService_1.zrxServiceFactory)(baseUrl);
|
package/package.json
CHANGED