@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 CHANGED
@@ -2792,14 +2792,14 @@ var getObligations = async ({
2792
2792
  );
2793
2793
  return obligations;
2794
2794
  };
2795
- var getObligationLocked = async (cache, obligationId) => {
2796
- const obligationObjectResponse = await cache.queryGetObject(obligationId, {
2795
+ var getObligationLocked = async (cache, obligation) => {
2796
+ const obligationObjectResponse = typeof obligation === "string" ? (await cache.queryGetObject(obligation, {
2797
2797
  showContent: true
2798
- });
2798
+ }))?.data : obligation;
2799
2799
  let obligationLocked = false;
2800
- if (obligationObjectResponse?.data && obligationObjectResponse?.data?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.data.content.fields) {
2800
+ if (obligationObjectResponse && obligationObjectResponse?.content?.dataType === "moveObject" && "lock_key" in obligationObjectResponse.content.fields) {
2801
2801
  obligationLocked = Boolean(
2802
- obligationObjectResponse.data.content.fields.lock_key
2802
+ obligationObjectResponse.content.fields.lock_key
2803
2803
  );
2804
2804
  }
2805
2805
  return obligationLocked;
@@ -6392,7 +6392,7 @@ var ScallopIndexer = class {
6392
6392
  const response = await this.cache.queryClient.fetchQuery({
6393
6393
  queryKey: ["market"],
6394
6394
  queryFn: async () => {
6395
- return await this._requestClient.get(`/api/market`);
6395
+ return await this._requestClient.get(`/api/market/migrate`);
6396
6396
  }
6397
6397
  });
6398
6398
  if (response.status === 200) {
@@ -6455,7 +6455,7 @@ var ScallopIndexer = class {
6455
6455
  const response = await this.cache.queryClient.fetchQuery({
6456
6456
  queryKey: ["spools"],
6457
6457
  queryFn: async () => {
6458
- return await this._requestClient.get(`/api/spools`);
6458
+ return await this._requestClient.get(`/api/spools/migrate`);
6459
6459
  }
6460
6460
  });
6461
6461
  if (response.status === 200) {
@@ -6484,7 +6484,7 @@ var ScallopIndexer = class {
6484
6484
  const response = await this.cache.queryClient.fetchQuery({
6485
6485
  queryKey: ["borrowIncentivePools"],
6486
6486
  queryFn: async () => {
6487
- return await this._requestClient.get(`/api/borrowIncentivePools`);
6487
+ return await this._requestClient.get(`/api/borrowIncentivePools/migrate`);
6488
6488
  }
6489
6489
  });
6490
6490
  if (response.status === 200) {
@@ -7685,7 +7685,7 @@ var ScallopClient = class {
7685
7685
  await this.utils.mergeSimilarCoins(
7686
7686
  txBlock,
7687
7687
  coin,
7688
- this.utils.parseCoinType(this.utils.parseCoinName(stakeCoinName)),
7688
+ this.utils.parseCoinType(stakeCoinName),
7689
7689
  requireSender(txBlock)
7690
7690
  );
7691
7691
  txBlock.transferObjects([coin], sender);