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