@kaspacom/swap-sdk 1.1.13 → 1.1.14

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/index.cjs CHANGED
@@ -1517,8 +1517,8 @@ var SwapService = class {
1517
1517
  return aIn;
1518
1518
  }
1519
1519
  async getAmountsOut(buyAmountWei, pathAddresses) {
1520
- const [, aOut] = await this.routerContract.getAmountsOut(buyAmountWei, pathAddresses);
1521
- return aOut;
1520
+ const results = await this.routerContract.getAmountsOut(buyAmountWei, pathAddresses);
1521
+ return results[results.length - 1];
1522
1522
  }
1523
1523
  /**
1524
1524
  *
@@ -1562,6 +1562,7 @@ var SwapService = class {
1562
1562
  amountOut = String((0, import_ethers2.parseUnits)(targetAmount, buyToken.decimals));
1563
1563
  } else {
1564
1564
  amountOut = String(await this.getAmountsOut(sellAmountWei, pathAddresses));
1565
+ console.log("getAmountsOut", amountOut);
1565
1566
  amountIn = String((0, import_ethers2.parseUnits)(targetAmount, sellToken.decimals));
1566
1567
  }
1567
1568
  let amounts = {