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

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "0.46.45",
3
+ "version": "0.46.46",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -742,12 +742,12 @@ export class ScallopClient {
742
742
  const sender = walletAddress || this.walletAddress;
743
743
  txBlock.setSender(sender);
744
744
 
745
- const marketCoins = await txBlock.unstakeQuick(
745
+ const marketCoin = await txBlock.unstakeQuick(
746
746
  amount,
747
747
  stakeMarketCoinName,
748
748
  stakeAccountId
749
749
  );
750
- txBlock.transferObjects(marketCoins, sender);
750
+ txBlock.transferObjects([marketCoin], sender);
751
751
 
752
752
  if (sign) {
753
753
  return (await this.suiKit.signAndSendTxn(
@@ -790,20 +790,16 @@ export class ScallopClient {
790
790
  const sender = walletAddress || this.walletAddress;
791
791
  txBlock.setSender(sender);
792
792
 
793
- const stakeMarketCoins = await txBlock.unstakeQuick(
793
+ const stakeMarketCoin = await txBlock.unstakeQuick(
794
794
  amount,
795
795
  stakeMarketCoinName,
796
796
  stakeAccountId
797
797
  );
798
+ const stakeCoinName =
799
+ this.utils.parseCoinName<SupportStakeCoins>(stakeMarketCoinName);
800
+ const coin = txBlock.withdraw(stakeMarketCoin, stakeCoinName);
798
801
 
799
- const coins = [];
800
- for (const stakeMarketCoin of stakeMarketCoins) {
801
- const stakeCoinName =
802
- this.utils.parseCoinName<SupportStakeCoins>(stakeMarketCoinName);
803
- const coin = txBlock.withdraw(stakeMarketCoin, stakeCoinName);
804
- coins.push(coin);
805
- }
806
- txBlock.transferObjects(coins, sender);
802
+ txBlock.transferObjects([coin], sender);
807
803
 
808
804
  if (sign) {
809
805
  return (await this.suiKit.signAndSendTxn(