@scallop-io/sui-scallop-sdk 0.44.25 → 0.44.27

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.mjs CHANGED
@@ -4862,10 +4862,13 @@ var requireObligationInfo2 = async (...params) => {
4862
4862
  if (obligations.length === 0) {
4863
4863
  throw new Error(`No obligation found for sender ${sender}`);
4864
4864
  }
4865
+ const selectedObligation = obligations.find(
4866
+ (obligation) => obligation.id === obligationId || obligation.keyId === obligationKey
4867
+ ) ?? obligations[0];
4865
4868
  return {
4866
- obligationId: obligations[0].id,
4867
- obligationKey: obligations[0].keyId,
4868
- obligationLocked: obligations[0].locked
4869
+ obligationId: selectedObligation.id,
4870
+ obligationKey: selectedObligation.keyId,
4871
+ obligationLocked: selectedObligation.locked
4869
4872
  };
4870
4873
  };
4871
4874
  var getBindedObligationId = async (builder, veScaKey) => {
@@ -4980,6 +4983,19 @@ var generateBorrowIncentiveNormalMethod = ({ builder, txBlock }) => {
4980
4983
  ],
4981
4984
  [rewardType]
4982
4985
  );
4986
+ },
4987
+ deactivateBoost: (obligation, veScaKey) => {
4988
+ return txBlock.moveCall(
4989
+ `${borrowIncentiveIds.borrowIncentivePkg}::user::deactivate_boost`,
4990
+ [
4991
+ borrowIncentiveIds.config,
4992
+ borrowIncentiveIds.incentivePools,
4993
+ borrowIncentiveIds.incentiveAccounts,
4994
+ obligation,
4995
+ veScaKey,
4996
+ SUI_CLOCK_OBJECT_ID5
4997
+ ]
4998
+ );
4983
4999
  }
4984
5000
  };
4985
5001
  };