@scallop-io/sui-scallop-sdk 0.46.58-alpha.1 → 0.46.58
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 +12 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -10
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopClient.d.ts +1 -1
- package/package.json +1 -1
- package/src/models/scallopClient.ts +14 -11
package/dist/index.mjs
CHANGED
|
@@ -7679,7 +7679,7 @@ var ScallopClient = class {
|
|
|
7679
7679
|
* Function to migrate all market coin in user wallet into sCoin
|
|
7680
7680
|
* @returns Transaction response
|
|
7681
7681
|
*/
|
|
7682
|
-
async migrateAllMarketCoin(sign = true) {
|
|
7682
|
+
async migrateAllMarketCoin(includeStakePool = true, sign = true) {
|
|
7683
7683
|
const txBlock = this.builder.createTxBlock();
|
|
7684
7684
|
txBlock.setSender(this.walletAddress);
|
|
7685
7685
|
const toTransfer = [];
|
|
@@ -7715,16 +7715,18 @@ var ScallopClient = class {
|
|
|
7715
7715
|
);
|
|
7716
7716
|
sCoins2.push(sCoin);
|
|
7717
7717
|
}
|
|
7718
|
-
if (
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7718
|
+
if (includeStakePool) {
|
|
7719
|
+
if (SUPPORT_SPOOLS.includes(sCoinName)) {
|
|
7720
|
+
try {
|
|
7721
|
+
const sCoin = await txBlock.unstakeQuick(
|
|
7722
|
+
Number.MAX_SAFE_INTEGER,
|
|
7723
|
+
sCoinName
|
|
7724
|
+
);
|
|
7725
|
+
if (sCoin) {
|
|
7726
|
+
sCoins2.push(sCoin);
|
|
7727
|
+
}
|
|
7728
|
+
} catch (e) {
|
|
7726
7729
|
}
|
|
7727
|
-
} catch (e) {
|
|
7728
7730
|
}
|
|
7729
7731
|
}
|
|
7730
7732
|
if (sCoins2.length > 0) {
|