@scallop-io/sui-scallop-sdk 0.46.44 → 0.46.45

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.mjs CHANGED
@@ -7409,25 +7409,14 @@ var ScallopClient = class {
7409
7409
  }
7410
7410
  if (SUPPORT_SPOOLS.includes(sCoinName)) {
7411
7411
  try {
7412
- const stakedMarketCoins = await txBlock.unstakeQuick(
7412
+ const stakedMarketCoin = await txBlock.unstakeQuick(
7413
7413
  Number.MAX_SAFE_INTEGER,
7414
7414
  sCoinName
7415
7415
  );
7416
- if (stakedMarketCoins.length > 0) {
7417
- const mergedStakedMarketCoin = stakedMarketCoins[0];
7418
- if (stakedMarketCoins.length > 1) {
7419
- txBlock.mergeCoins(
7420
- mergedStakedMarketCoin,
7421
- stakedMarketCoins.slice(1)
7422
- );
7423
- }
7424
- if (toDestroyMarketCoin) {
7425
- txBlock.mergeCoins(toDestroyMarketCoin, [
7426
- mergedStakedMarketCoin
7427
- ]);
7428
- } else {
7429
- toDestroyMarketCoin = mergedStakedMarketCoin;
7430
- }
7416
+ if (toDestroyMarketCoin) {
7417
+ txBlock.mergeCoins(toDestroyMarketCoin, [stakedMarketCoin]);
7418
+ } else {
7419
+ toDestroyMarketCoin = stakedMarketCoin;
7431
7420
  }
7432
7421
  } catch (e) {
7433
7422
  const errMsg = e.toString();