@shapeshiftoss/swapper 15.3.3 → 15.4.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.
@@ -11,7 +11,7 @@ const cowService_1 = require("../utils/cowService");
11
11
  const helpers_1 = require("../utils/helpers/helpers");
12
12
  async function cowExecuteTrade({ apiUrl, adapter }, { trade, wallet }) {
13
13
  const cowTrade = trade;
14
- const { sellAsset, buyAsset, feeAmountInSellTokenCryptoBaseUnit: feeAmountInSellToken, sellAmountDeductFeeCryptoBaseUnit: sellAmountWithoutFee, } = cowTrade;
14
+ const { sellAsset, buyAsset, feeAmountInSellTokenCryptoBaseUnit: feeAmountInSellToken, sellAmountDeductFeeCryptoBaseUnit: sellAmountWithoutFee, accountNumber, } = cowTrade;
15
15
  const { assetReference: sellAssetErc20Address, assetNamespace: sellAssetNamespace } = (0, caip_1.fromAssetId)(sellAsset.assetId);
16
16
  const { assetReference: buyAssetErc20Address, chainId: buyAssetChainId } = (0, caip_1.fromAssetId)(buyAsset.assetId);
17
17
  if (sellAssetNamespace !== 'erc20') {
@@ -46,7 +46,7 @@ async function cowExecuteTrade({ apiUrl, adapter }, { trade, wallet }) {
46
46
  // Some context about this : https://docs.cow.fi/tutorials/how-to-submit-orders-via-the-api/4.-signing-the-order
47
47
  // For more info, check hashOrder method implementation
48
48
  const orderDigest = (0, helpers_1.hashOrder)((0, helpers_1.domain)(1, constants_1.COW_SWAP_SETTLEMENT_ADDRESS), orderToSign);
49
- const bip44Params = chain_adapters_1.ethereum.ChainAdapter.defaultBIP44Params;
49
+ const bip44Params = adapter.getBIP44Params({ accountNumber });
50
50
  const message = {
51
51
  messageToSign: {
52
52
  addressNList: (0, chain_adapters_1.toAddressNList)(bip44Params),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "15.3.3",
3
+ "version": "15.4.0",
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",