@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 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
  };
@@ -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 });
@@ -20,7 +20,6 @@ export declare const setupBuildTrade: () => {
20
20
  } & {
21
21
  chainId: import("../../../api").EvmSupportedChainIds;
22
22
  } & {
23
- buyAssetAccountNumber: number;
24
23
  slippage?: string | undefined;
25
24
  wallet: HDWallet;
26
25
  };
@@ -41,7 +41,6 @@ const setupBuildTrade = () => {
41
41
  buyAsset,
42
42
  sendMax: false,
43
43
  sellAssetAccountNumber: 0,
44
- buyAssetAccountNumber: 0,
45
44
  sellAsset,
46
45
  wallet: {},
47
46
  receiveAddress: ''
@@ -18,7 +18,6 @@ export declare const setupExecuteTrade: () => {
18
18
  sellAsset: Asset;
19
19
  sendMax: boolean;
20
20
  sellAssetAccountNumber: number;
21
- buyAssetAccountNumber: number;
22
21
  txData: string;
23
22
  depositAddress: string;
24
23
  receiveAddress: string;
@@ -34,7 +34,6 @@ const setupExecuteTrade = () => {
34
34
  sellAsset,
35
35
  sendMax: false,
36
36
  sellAssetAccountNumber: 0,
37
- buyAssetAccountNumber: 0,
38
37
  txData: '0x0',
39
38
  depositAddress: '0x0',
40
39
  receiveAddress: '0x0',
@@ -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, buyAssetAccountNumber, wallet } = input;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "An interface and implementations to trade coins via various protocols",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",