@tradeport/sui-trading-sdk 0.3.4 → 0.3.5
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts +6 -8
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5161,18 +5161,18 @@ function getTransferPolicyForDirectTransfer(collectionChainState) {
|
|
|
5161
5161
|
}
|
|
5162
5162
|
|
|
5163
5163
|
// src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts
|
|
5164
|
-
async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max }, context) {
|
|
5164
|
+
async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max = 5 }, context) {
|
|
5165
5165
|
const tx = new import_transactions16.Transaction();
|
|
5166
5166
|
const res = await gqlChainRequest({
|
|
5167
5167
|
chain: "sui",
|
|
5168
5168
|
query: fetchKiosksByOwner,
|
|
5169
5169
|
variables: { ownerAddress: addLeadingZerosAfter0x(walletAddress) }
|
|
5170
5170
|
});
|
|
5171
|
-
const unsharedOBKiosks = res?.kiosks?.filter((k) => !k.is_shared && k.is_origin_byte)?.map((k) => k.id)
|
|
5171
|
+
const unsharedOBKiosks = res?.kiosks?.filter((k) => !k.is_shared && k.is_origin_byte)?.map((k) => k.id);
|
|
5172
5172
|
let currentMigrationCount = 0;
|
|
5173
5173
|
const sharedOBKiosk = res?.kiosks?.filter((k) => k.is_shared && k.is_origin_byte)?.[0]?.id;
|
|
5174
5174
|
for (const unsharedOBKiosk of unsharedOBKiosks) {
|
|
5175
|
-
if (currentMigrationCount >=
|
|
5175
|
+
if (currentMigrationCount >= max) {
|
|
5176
5176
|
continue;
|
|
5177
5177
|
}
|
|
5178
5178
|
const res2 = await gqlChainRequest({
|
|
@@ -5217,9 +5217,9 @@ async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max }, con
|
|
|
5217
5217
|
}
|
|
5218
5218
|
}
|
|
5219
5219
|
}
|
|
5220
|
-
const unsharedNativeKiosks = res?.kiosks?.filter((k) => !k.is_shared && !k.is_origin_byte)?.map((k) => k.id)
|
|
5220
|
+
const unsharedNativeKiosks = res?.kiosks?.filter((k) => !k.is_shared && !k.is_origin_byte)?.map((k) => k.id);
|
|
5221
5221
|
for (const unsharedNativeKiosk of unsharedNativeKiosks) {
|
|
5222
|
-
if (currentMigrationCount >=
|
|
5222
|
+
if (currentMigrationCount >= max) {
|
|
5223
5223
|
continue;
|
|
5224
5224
|
}
|
|
5225
5225
|
const res2 = await gqlChainRequest({
|