@scallop-io/sui-scallop-sdk 0.47.0-alpha.1 → 0.47.0-alpha.2
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 +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/dist/queries/coreQuery.d.ts +2 -2
- package/package.json +1 -1
- package/src/models/scallopClient.ts +1 -1
- package/src/models/scallopIndexer.ts +3 -3
- package/src/queries/coreQuery.ts +14 -9
package/dist/index.mjs
CHANGED
|
@@ -2718,14 +2718,14 @@ var getObligations = async ({
|
|
|
2718
2718
|
);
|
|
2719
2719
|
return obligations;
|
|
2720
2720
|
};
|
|
2721
|
-
var getObligationLocked = async (cache,
|
|
2722
|
-
const obligationObjectResponse = await cache.queryGetObject(
|
|
2721
|
+
var getObligationLocked = async (cache, obligation) => {
|
|
2722
|
+
const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
|
|
2723
2723
|
showContent: true
|
|
2724
|
-
});
|
|
2724
|
+
}))?.data : obligation;
|
|
2725
2725
|
let obligationLocked = false;
|
|
2726
|
-
if (obligationObjectResponse
|
|
2726
|
+
if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
|
|
2727
2727
|
obligationLocked = Boolean(
|
|
2728
|
-
obligationObjectResponse.
|
|
2728
|
+
obligationObjectResponse.content.fields.lock_key
|
|
2729
2729
|
);
|
|
2730
2730
|
}
|
|
2731
2731
|
return obligationLocked;
|
|
@@ -6332,7 +6332,7 @@ var ScallopIndexer = class {
|
|
|
6332
6332
|
const response = await this.cache.queryClient.fetchQuery({
|
|
6333
6333
|
queryKey: ["market"],
|
|
6334
6334
|
queryFn: async () => {
|
|
6335
|
-
return await this._requestClient.get(`/api/market`);
|
|
6335
|
+
return await this._requestClient.get(`/api/market/migrate`);
|
|
6336
6336
|
}
|
|
6337
6337
|
});
|
|
6338
6338
|
if (response.status === 200) {
|
|
@@ -6395,7 +6395,7 @@ var ScallopIndexer = class {
|
|
|
6395
6395
|
const response = await this.cache.queryClient.fetchQuery({
|
|
6396
6396
|
queryKey: ["spools"],
|
|
6397
6397
|
queryFn: async () => {
|
|
6398
|
-
return await this._requestClient.get(`/api/spools`);
|
|
6398
|
+
return await this._requestClient.get(`/api/spools/migrate`);
|
|
6399
6399
|
}
|
|
6400
6400
|
});
|
|
6401
6401
|
if (response.status === 200) {
|
|
@@ -6424,7 +6424,7 @@ var ScallopIndexer = class {
|
|
|
6424
6424
|
const response = await this.cache.queryClient.fetchQuery({
|
|
6425
6425
|
queryKey: ["borrowIncentivePools"],
|
|
6426
6426
|
queryFn: async () => {
|
|
6427
|
-
return await this._requestClient.get(`/api/borrowIncentivePools`);
|
|
6427
|
+
return await this._requestClient.get(`/api/borrowIncentivePools/migrate`);
|
|
6428
6428
|
}
|
|
6429
6429
|
});
|
|
6430
6430
|
if (response.status === 200) {
|
|
@@ -7625,7 +7625,7 @@ var ScallopClient = class {
|
|
|
7625
7625
|
await this.utils.mergeSimilarCoins(
|
|
7626
7626
|
txBlock,
|
|
7627
7627
|
coin,
|
|
7628
|
-
this.utils.parseCoinType(
|
|
7628
|
+
this.utils.parseCoinType(stakeCoinName),
|
|
7629
7629
|
requireSender(txBlock)
|
|
7630
7630
|
);
|
|
7631
7631
|
txBlock.transferObjects([coin], sender);
|