@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.mjs
CHANGED
|
@@ -5137,18 +5137,18 @@ function getTransferPolicyForDirectTransfer(collectionChainState) {
|
|
|
5137
5137
|
}
|
|
5138
5138
|
|
|
5139
5139
|
// src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts
|
|
5140
|
-
async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max }, context) {
|
|
5140
|
+
async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max = 5 }, context) {
|
|
5141
5141
|
const tx = new Transaction16();
|
|
5142
5142
|
const res = await gqlChainRequest({
|
|
5143
5143
|
chain: "sui",
|
|
5144
5144
|
query: fetchKiosksByOwner,
|
|
5145
5145
|
variables: { ownerAddress: addLeadingZerosAfter0x(walletAddress) }
|
|
5146
5146
|
});
|
|
5147
|
-
const unsharedOBKiosks = res?.kiosks?.filter((k) => !k.is_shared && k.is_origin_byte)?.map((k) => k.id)
|
|
5147
|
+
const unsharedOBKiosks = res?.kiosks?.filter((k) => !k.is_shared && k.is_origin_byte)?.map((k) => k.id);
|
|
5148
5148
|
let currentMigrationCount = 0;
|
|
5149
5149
|
const sharedOBKiosk = res?.kiosks?.filter((k) => k.is_shared && k.is_origin_byte)?.[0]?.id;
|
|
5150
5150
|
for (const unsharedOBKiosk of unsharedOBKiosks) {
|
|
5151
|
-
if (currentMigrationCount >=
|
|
5151
|
+
if (currentMigrationCount >= max) {
|
|
5152
5152
|
continue;
|
|
5153
5153
|
}
|
|
5154
5154
|
const res2 = await gqlChainRequest({
|
|
@@ -5193,9 +5193,9 @@ async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max }, con
|
|
|
5193
5193
|
}
|
|
5194
5194
|
}
|
|
5195
5195
|
}
|
|
5196
|
-
const unsharedNativeKiosks = res?.kiosks?.filter((k) => !k.is_shared && !k.is_origin_byte)?.map((k) => k.id)
|
|
5196
|
+
const unsharedNativeKiosks = res?.kiosks?.filter((k) => !k.is_shared && !k.is_origin_byte)?.map((k) => k.id);
|
|
5197
5197
|
for (const unsharedNativeKiosk of unsharedNativeKiosks) {
|
|
5198
|
-
if (currentMigrationCount >=
|
|
5198
|
+
if (currentMigrationCount >= max) {
|
|
5199
5199
|
continue;
|
|
5200
5200
|
}
|
|
5201
5201
|
const res2 = await gqlChainRequest({
|