@tradeport/sui-trading-sdk 0.1.21 → 0.1.22

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 0f20bd6: Added existing tx arg for buyAndExerciseLongLocks
8
+
3
9
  ## 0.1.21
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -19,6 +19,7 @@ type BuyAndExerciseLongLocks = {
19
19
  id: string;
20
20
  bidId?: string;
21
21
  }>;
22
+ tx?: Transaction;
22
23
  };
23
24
 
24
25
  type BuyListings = {
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ type BuyAndExerciseLongLocks = {
19
19
  id: string;
20
20
  bidId?: string;
21
21
  }>;
22
+ tx?: Transaction;
22
23
  };
23
24
 
24
25
  type BuyListings = {
package/dist/index.js CHANGED
@@ -1901,8 +1901,8 @@ async function exerciseLongLocks({ walletAddress, transaction, locks }, context)
1901
1901
  }
1902
1902
 
1903
1903
  // src/methods/buyAndExerciseLongLocks/buyAndExerciseLongLocks.ts
1904
- async function buyAndExerciseLongLocks({ walletAddress, locks }, context) {
1905
- const transaction = new import_transactions5.Transaction();
1904
+ async function buyAndExerciseLongLocks({ walletAddress, locks, tx: existingTx }, context) {
1905
+ const transaction = existingTx ?? new import_transactions5.Transaction();
1906
1906
  await buyLocks({ lockIds: locks?.map((lock) => lock?.id), transaction });
1907
1907
  await exerciseLongLocks({ locks, walletAddress, transaction }, context);
1908
1908
  return transaction;
@@ -3602,13 +3602,11 @@ function addTradePortKioskPlaceNftBidTx({
3602
3602
  }) {
3603
3603
  const { transferPolicy } = sharedObjects;
3604
3604
  const marketFeePrice = getMarketFeePrice({ price: bidAmount, collectionId });
3605
- console.log("transferPolicy", transferPolicy);
3606
3605
  const royaltyCoin = tx.moveCall({
3607
3606
  target: `${royaltyRulePackageId}::${royaltyRuleModule}::fee_amount`,
3608
3607
  arguments: [tx.object(transferPolicy), tx.pure.u64(bidAmount?.toString())],
3609
3608
  typeArguments: [nftType]
3610
3609
  });
3611
- console.log("royaltyCoin", royaltyCoin);
3612
3610
  const [coin1, coin2] = splitCoins({
3613
3611
  tx,
3614
3612
  amounts: [tx.pure.u64(bidAmount + marketFeePrice), tx.object(royaltyCoin)]