@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 +6 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/methods/buyAndExerciseLongLocks/buyAndExerciseLongLocks.ts +3 -2
- package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +0 -4
package/package.json
CHANGED
|
@@ -9,13 +9,14 @@ export type BuyAndExerciseLongLocks = {
|
|
|
9
9
|
id: string;
|
|
10
10
|
bidId?: string;
|
|
11
11
|
}>;
|
|
12
|
+
tx?: Transaction;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export async function buyAndExerciseLongLocks(
|
|
15
|
-
{ walletAddress, locks }: BuyAndExerciseLongLocks,
|
|
16
|
+
{ walletAddress, locks, tx: existingTx }: BuyAndExerciseLongLocks,
|
|
16
17
|
context: RequestContext,
|
|
17
18
|
): Promise<Transaction> {
|
|
18
|
-
const transaction = new Transaction();
|
|
19
|
+
const transaction = existingTx ?? new Transaction();
|
|
19
20
|
|
|
20
21
|
await buyLocks({ lockIds: locks?.map((lock) => lock?.id), transaction });
|
|
21
22
|
await exerciseLongLocks({ locks, walletAddress, transaction }, context);
|
|
@@ -57,16 +57,12 @@ function addTradePortKioskPlaceNftBidTx({
|
|
|
57
57
|
const { transferPolicy } = sharedObjects;
|
|
58
58
|
const marketFeePrice = getMarketFeePrice({ price: bidAmount, collectionId });
|
|
59
59
|
|
|
60
|
-
console.log('transferPolicy', transferPolicy);
|
|
61
|
-
|
|
62
60
|
const royaltyCoin = tx.moveCall({
|
|
63
61
|
target: `${royaltyRulePackageId}::${royaltyRuleModule}::fee_amount`,
|
|
64
62
|
arguments: [tx.object(transferPolicy), tx.pure.u64(bidAmount?.toString())],
|
|
65
63
|
typeArguments: [nftType],
|
|
66
64
|
});
|
|
67
65
|
|
|
68
|
-
console.log('royaltyCoin', royaltyCoin);
|
|
69
|
-
|
|
70
66
|
const [coin1, coin2] = splitCoins({
|
|
71
67
|
tx,
|
|
72
68
|
amounts: [tx.pure.u64(bidAmount + marketFeePrice), tx.object(royaltyCoin)],
|