@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/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/scallopClient.ts +7 -11
package/dist/index.mjs
CHANGED
|
@@ -7246,12 +7246,12 @@ var ScallopClient = class {
|
|
|
7246
7246
|
const txBlock = this.builder.createTxBlock();
|
|
7247
7247
|
const sender = walletAddress || this.walletAddress;
|
|
7248
7248
|
txBlock.setSender(sender);
|
|
7249
|
-
const
|
|
7249
|
+
const marketCoin = await txBlock.unstakeQuick(
|
|
7250
7250
|
amount,
|
|
7251
7251
|
stakeMarketCoinName,
|
|
7252
7252
|
stakeAccountId
|
|
7253
7253
|
);
|
|
7254
|
-
txBlock.transferObjects(
|
|
7254
|
+
txBlock.transferObjects([marketCoin], sender);
|
|
7255
7255
|
if (sign) {
|
|
7256
7256
|
return await this.suiKit.signAndSendTxn(
|
|
7257
7257
|
txBlock
|
|
@@ -7264,18 +7264,14 @@ var ScallopClient = class {
|
|
|
7264
7264
|
const txBlock = this.builder.createTxBlock();
|
|
7265
7265
|
const sender = walletAddress || this.walletAddress;
|
|
7266
7266
|
txBlock.setSender(sender);
|
|
7267
|
-
const
|
|
7267
|
+
const stakeMarketCoin = await txBlock.unstakeQuick(
|
|
7268
7268
|
amount,
|
|
7269
7269
|
stakeMarketCoinName,
|
|
7270
7270
|
stakeAccountId
|
|
7271
7271
|
);
|
|
7272
|
-
const
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
const coin = txBlock.withdraw(stakeMarketCoin, stakeCoinName);
|
|
7276
|
-
coins.push(coin);
|
|
7277
|
-
}
|
|
7278
|
-
txBlock.transferObjects(coins, sender);
|
|
7272
|
+
const stakeCoinName = this.utils.parseCoinName(stakeMarketCoinName);
|
|
7273
|
+
const coin = txBlock.withdraw(stakeMarketCoin, stakeCoinName);
|
|
7274
|
+
txBlock.transferObjects([coin], sender);
|
|
7279
7275
|
if (sign) {
|
|
7280
7276
|
return await this.suiKit.signAndSendTxn(
|
|
7281
7277
|
txBlock
|