@kaspacom/swap-sdk 1.1.13 → 1.1.15
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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +3 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1485,8 +1485,8 @@ var SwapService = class {
|
|
|
1485
1485
|
return aIn;
|
|
1486
1486
|
}
|
|
1487
1487
|
async getAmountsOut(buyAmountWei, pathAddresses) {
|
|
1488
|
-
const
|
|
1489
|
-
return
|
|
1488
|
+
const results = await this.routerContract.getAmountsOut(buyAmountWei, pathAddresses);
|
|
1489
|
+
return results[results.length - 1];
|
|
1490
1490
|
}
|
|
1491
1491
|
/**
|
|
1492
1492
|
*
|
|
@@ -1530,6 +1530,7 @@ var SwapService = class {
|
|
|
1530
1530
|
amountOut = String(parseUnits(targetAmount, buyToken.decimals));
|
|
1531
1531
|
} else {
|
|
1532
1532
|
amountOut = String(await this.getAmountsOut(sellAmountWei, pathAddresses));
|
|
1533
|
+
console.log("getAmountsOut", amountOut);
|
|
1533
1534
|
amountIn = String(parseUnits(targetAmount, sellToken.decimals));
|
|
1534
1535
|
}
|
|
1535
1536
|
let amounts = {
|