@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.js CHANGED
@@ -7469,25 +7469,14 @@ var ScallopClient = class {
7469
7469
  }
7470
7470
  if (SUPPORT_SPOOLS.includes(sCoinName)) {
7471
7471
  try {
7472
- const stakedMarketCoins = await txBlock.unstakeQuick(
7472
+ const stakedMarketCoin = await txBlock.unstakeQuick(
7473
7473
  Number.MAX_SAFE_INTEGER,
7474
7474
  sCoinName
7475
7475
  );
7476
- if (stakedMarketCoins.length > 0) {
7477
- const mergedStakedMarketCoin = stakedMarketCoins[0];
7478
- if (stakedMarketCoins.length > 1) {
7479
- txBlock.mergeCoins(
7480
- mergedStakedMarketCoin,
7481
- stakedMarketCoins.slice(1)
7482
- );
7483
- }
7484
- if (toDestroyMarketCoin) {
7485
- txBlock.mergeCoins(toDestroyMarketCoin, [
7486
- mergedStakedMarketCoin
7487
- ]);
7488
- } else {
7489
- toDestroyMarketCoin = mergedStakedMarketCoin;
7490
- }
7476
+ if (toDestroyMarketCoin) {
7477
+ txBlock.mergeCoins(toDestroyMarketCoin, [stakedMarketCoin]);
7478
+ } else {
7479
+ toDestroyMarketCoin = stakedMarketCoin;
7491
7480
  }
7492
7481
  } catch (e) {
7493
7482
  const errMsg = e.toString();