@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.js
CHANGED
|
@@ -7739,7 +7739,7 @@ var ScallopClient = class {
|
|
|
7739
7739
|
* Function to migrate all market coin in user wallet into sCoin
|
|
7740
7740
|
* @returns Transaction response
|
|
7741
7741
|
*/
|
|
7742
|
-
async migrateAllMarketCoin(sign = true) {
|
|
7742
|
+
async migrateAllMarketCoin(includeStakePool = true, sign = true) {
|
|
7743
7743
|
const txBlock = this.builder.createTxBlock();
|
|
7744
7744
|
txBlock.setSender(this.walletAddress);
|
|
7745
7745
|
const toTransfer = [];
|
|
@@ -7775,16 +7775,18 @@ var ScallopClient = class {
|
|
|
7775
7775
|
);
|
|
7776
7776
|
sCoins2.push(sCoin);
|
|
7777
7777
|
}
|
|
7778
|
-
if (
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7778
|
+
if (includeStakePool) {
|
|
7779
|
+
if (SUPPORT_SPOOLS.includes(sCoinName)) {
|
|
7780
|
+
try {
|
|
7781
|
+
const sCoin = await txBlock.unstakeQuick(
|
|
7782
|
+
Number.MAX_SAFE_INTEGER,
|
|
7783
|
+
sCoinName
|
|
7784
|
+
);
|
|
7785
|
+
if (sCoin) {
|
|
7786
|
+
sCoins2.push(sCoin);
|
|
7787
|
+
}
|
|
7788
|
+
} catch (e) {
|
|
7786
7789
|
}
|
|
7787
|
-
} catch (e) {
|
|
7788
7790
|
}
|
|
7789
7791
|
}
|
|
7790
7792
|
if (sCoins2.length > 0) {
|