@t2000/sdk 0.17.8 → 0.17.9

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.js CHANGED
@@ -4644,7 +4644,6 @@ To sell investment: t2000 invest sell ${params.amount} ${fromAsset}`,
4644
4644
  const sellAmount = Math.max(0, pos.totalAmount - gasReserve);
4645
4645
  const rawAmount = BigInt(Math.floor(sellAmount * 10 ** assetInfo.decimals));
4646
4646
  const [splitCoin] = tx.splitCoins(merged, [rawAmount]);
4647
- const assetUsd = sellAmount * (pos.avgPrice || 1);
4648
4647
  const slippageBps = LOW_LIQUIDITY_ASSETS.has(pos.asset) ? 500 : 300;
4649
4648
  const { outputCoin, estimatedOut, toDecimals } = await swapAdapter.addSwapToTx(
4650
4649
  tx,
@@ -4652,7 +4651,7 @@ To sell investment: t2000 invest sell ${params.amount} ${fromAsset}`,
4652
4651
  splitCoin,
4653
4652
  pos.asset,
4654
4653
  "USDC",
4655
- assetUsd,
4654
+ sellAmount,
4656
4655
  slippageBps
4657
4656
  );
4658
4657
  usdcOutputs.push(outputCoin);
@@ -4785,7 +4784,7 @@ To sell investment: t2000 invest sell ${params.amount} ${fromAsset}`,
4785
4784
  splitCoin,
4786
4785
  sell.asset,
4787
4786
  "USDC",
4788
- sell.usdAmount,
4787
+ sellAmount,
4789
4788
  slippageBps
4790
4789
  );
4791
4790
  usdcCoins.push(outputCoin);