@tradeport/sui-trading-sdk 0.4.21 → 0.4.23
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 +22 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/kiosk/resolveTransferPolicies.ts +9 -11
- package/src/methods/transferNfts/transferNfts.ts +19 -19
package/dist/index.js
CHANGED
|
@@ -1733,18 +1733,16 @@ var resolveTransferPolicies = async ({
|
|
|
1733
1733
|
suiClient,
|
|
1734
1734
|
transferPolicyId
|
|
1735
1735
|
});
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
{
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
];
|
|
1747
|
-
}
|
|
1736
|
+
policies = [
|
|
1737
|
+
{
|
|
1738
|
+
data: {
|
|
1739
|
+
id: transferPolicyId,
|
|
1740
|
+
rules: ruleNames
|
|
1741
|
+
},
|
|
1742
|
+
transferRequest,
|
|
1743
|
+
isCustom: false
|
|
1744
|
+
}
|
|
1745
|
+
];
|
|
1748
1746
|
}
|
|
1749
1747
|
} else {
|
|
1750
1748
|
const transferPoliciesFromMystenSdk = await kioskClient.getTransferPolicies({
|
|
@@ -6554,6 +6552,18 @@ var transferNfts = async ({ nftIds, recipientAddress, walletAddress }, context)
|
|
|
6554
6552
|
recipientAddress,
|
|
6555
6553
|
transferPolicies
|
|
6556
6554
|
};
|
|
6555
|
+
if (!txData.senderKiosk) {
|
|
6556
|
+
tx.transferObjects(
|
|
6557
|
+
[tx.object(txData.nftTokenId)],
|
|
6558
|
+
tx.pure.address(addLeadingZerosAfter0x(recipientAddress))
|
|
6559
|
+
);
|
|
6560
|
+
continue;
|
|
6561
|
+
}
|
|
6562
|
+
const isSenderKioskOriginByte = await isOBKiosk(txData.senderAddress, txData.senderKiosk);
|
|
6563
|
+
if (isSenderKioskOriginByte) {
|
|
6564
|
+
await addOriginByteTransferNftTx(txData);
|
|
6565
|
+
continue;
|
|
6566
|
+
}
|
|
6557
6567
|
if (txData?.senderKiosk && !hasNativeKioskTransferPolicyRules(txData?.transferPolicies)) {
|
|
6558
6568
|
await kioskTxWrapper({
|
|
6559
6569
|
tx: txData?.tx,
|
|
@@ -6580,18 +6590,6 @@ var transferNfts = async ({ nftIds, recipientAddress, walletAddress }, context)
|
|
|
6580
6590
|
});
|
|
6581
6591
|
continue;
|
|
6582
6592
|
}
|
|
6583
|
-
if (!txData.senderKiosk) {
|
|
6584
|
-
tx.transferObjects(
|
|
6585
|
-
[tx.object(txData.nftTokenId)],
|
|
6586
|
-
tx.pure.address(addLeadingZerosAfter0x(recipientAddress))
|
|
6587
|
-
);
|
|
6588
|
-
continue;
|
|
6589
|
-
}
|
|
6590
|
-
const isSenderKioskOriginByte = await isOBKiosk(txData.senderAddress, txData.senderKiosk);
|
|
6591
|
-
if (isSenderKioskOriginByte) {
|
|
6592
|
-
await addOriginByteTransferNftTx(txData);
|
|
6593
|
-
continue;
|
|
6594
|
-
}
|
|
6595
6593
|
if (await canBeTransferedDirectly(context.suiClient, nft?.collection?.chain_state)) {
|
|
6596
6594
|
nftsToTransferDirectly.push(nft);
|
|
6597
6595
|
} else {
|