@tradeport/sui-trading-sdk 0.1.83 → 0.1.84
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.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/kiosk/lockNftInsideKioskIfNotLocked.ts +6 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -734,9 +734,11 @@ var lockNftInsideKioskIfNotLocked = async ({
|
|
|
734
734
|
nftType,
|
|
735
735
|
transferPolicyId
|
|
736
736
|
}) => {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
737
|
+
try {
|
|
738
|
+
const res = await kioskClient.getKiosk({ id: sellerKiosk });
|
|
739
|
+
const isLocked = res?.items?.find((i) => i.objectId === nftTokenId)?.isLocked;
|
|
740
|
+
if (isLocked)
|
|
741
|
+
return;
|
|
740
742
|
const item = kioskTx.take({
|
|
741
743
|
itemId: nftTokenId,
|
|
742
744
|
itemType: nftType
|
|
@@ -751,6 +753,8 @@ var lockNftInsideKioskIfNotLocked = async ({
|
|
|
751
753
|
tx.object(item)
|
|
752
754
|
]
|
|
753
755
|
});
|
|
756
|
+
} catch (e) {
|
|
757
|
+
console.log("error attempting to lock nft inside kiosk if not locked", e);
|
|
754
758
|
}
|
|
755
759
|
};
|
|
756
760
|
|