@tradeport/sui-trading-sdk 0.1.32 → 0.1.33
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 +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/kiosk/kioskTxWrapper.ts +14 -1
- package/src/methods/claimNfts/claimNfts.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -449,7 +449,8 @@ var kioskTxWrapper = async ({
|
|
|
449
449
|
kioskOwner,
|
|
450
450
|
kiosk,
|
|
451
451
|
runCommands,
|
|
452
|
-
shouldConvertToPersonalKiosk
|
|
452
|
+
shouldConvertToPersonalKiosk,
|
|
453
|
+
kioskStrategy
|
|
453
454
|
}) => {
|
|
454
455
|
if (kioskTx) {
|
|
455
456
|
await runCommands(kioskTx);
|
|
@@ -462,7 +463,17 @@ var kioskTxWrapper = async ({
|
|
|
462
463
|
})).kiosks ?? [];
|
|
463
464
|
kiosks = kiosks?.filter((k) => !k.is_origin_byte);
|
|
464
465
|
if (kiosk) {
|
|
465
|
-
|
|
466
|
+
let filteredKiosks = [];
|
|
467
|
+
switch (kioskStrategy ?? "include") {
|
|
468
|
+
case "include":
|
|
469
|
+
filteredKiosks = kiosks.filter((k) => k?.id === kiosk);
|
|
470
|
+
break;
|
|
471
|
+
case "exclude":
|
|
472
|
+
filteredKiosks = kiosks.filter((k) => k?.id !== kiosk);
|
|
473
|
+
break;
|
|
474
|
+
default:
|
|
475
|
+
throw new Error(`Unsupported kiosk strategy ${kioskStrategy}`);
|
|
476
|
+
}
|
|
466
477
|
if (filteredKiosks.length > 0) {
|
|
467
478
|
kiosks = filteredKiosks;
|
|
468
479
|
}
|
|
@@ -3031,6 +3042,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
3031
3042
|
tx,
|
|
3032
3043
|
kioskOwner: txData?.claimer,
|
|
3033
3044
|
kiosk: txData?.sellerKiosk,
|
|
3045
|
+
kioskStrategy: "exclude",
|
|
3034
3046
|
async runCommands(kioskTx) {
|
|
3035
3047
|
await addClaimTransferredNftTx({ ...txData, kioskTx });
|
|
3036
3048
|
}
|
|
@@ -3040,6 +3052,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
3040
3052
|
tx,
|
|
3041
3053
|
kioskOwner: txData?.claimer,
|
|
3042
3054
|
kiosk: txData?.sellerKiosk,
|
|
3055
|
+
kioskStrategy: "exclude",
|
|
3043
3056
|
async runCommands(kioskTx) {
|
|
3044
3057
|
await addClaimTransferredNftWithPurchaseCapTx({ ...txData, kioskTx });
|
|
3045
3058
|
}
|