@tradeport/sui-trading-sdk 0.4.7 → 0.4.8
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 +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/kiosk/kioskTxWrapper.ts +6 -0
- package/src/methods/claimNfts/claimNfts.ts +5 -0
- package/src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts +1 -0
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ type Args = {
|
|
|
23
23
|
shouldConvertToPersonalKiosk?: boolean;
|
|
24
24
|
shouldAssertNftInSharedKiosk?: boolean;
|
|
25
25
|
shouldAllowNftUnsharedKiosk?: boolean;
|
|
26
|
+
shouldSkipFinalize?: boolean;
|
|
26
27
|
kioskStrategy?: 'include' | 'exclude';
|
|
27
28
|
failIfNoKiosk?: boolean;
|
|
28
29
|
};
|
|
@@ -38,6 +39,7 @@ export const kioskTxWrapper = async ({
|
|
|
38
39
|
shouldConvertToPersonalKiosk,
|
|
39
40
|
shouldAssertNftInSharedKiosk,
|
|
40
41
|
shouldAllowNftUnsharedKiosk,
|
|
42
|
+
shouldSkipFinalize,
|
|
41
43
|
kioskStrategy,
|
|
42
44
|
failIfNoKiosk,
|
|
43
45
|
}: Args) => {
|
|
@@ -141,4 +143,8 @@ export const kioskTxWrapper = async ({
|
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
await runCommands(kioskTx);
|
|
146
|
+
|
|
147
|
+
if(!shouldSkipFinalize) {
|
|
148
|
+
kioskTx.finalize();
|
|
149
|
+
}
|
|
144
150
|
};
|
|
@@ -161,6 +161,7 @@ export const claimNfts = async (
|
|
|
161
161
|
kioskTx: globalKioskTx,
|
|
162
162
|
shouldConvertToPersonalKiosk: true,
|
|
163
163
|
shouldAllowNftUnsharedKiosk: true,
|
|
164
|
+
shouldSkipFinalize: true,
|
|
164
165
|
async runCommands(kioskTx) {
|
|
165
166
|
existingKioskTx = kioskTx;
|
|
166
167
|
await addBluemoveClaimAcceptedBidNft({
|
|
@@ -184,6 +185,7 @@ export const claimNfts = async (
|
|
|
184
185
|
kioskTx: globalKioskTx,
|
|
185
186
|
shouldConvertToPersonalKiosk: true,
|
|
186
187
|
shouldAllowNftUnsharedKiosk: true,
|
|
188
|
+
shouldSkipFinalize: true,
|
|
187
189
|
async runCommands(kioskTx) {
|
|
188
190
|
existingKioskTx = kioskTx;
|
|
189
191
|
await addClaimAcceptedBidNftTx({ ...txData, kioskTx });
|
|
@@ -199,6 +201,7 @@ export const claimNfts = async (
|
|
|
199
201
|
kioskTx: globalKioskTx,
|
|
200
202
|
shouldConvertToPersonalKiosk: true,
|
|
201
203
|
shouldAssertNftInSharedKiosk: true,
|
|
204
|
+
shouldSkipFinalize: true,
|
|
202
205
|
async runCommands(kioskTx) {
|
|
203
206
|
existingKioskTx = kioskTx;
|
|
204
207
|
await addClaimAcceptedBidNftWithPurchaseCapTx({ ...txData, kioskTx });
|
|
@@ -234,6 +237,7 @@ export const claimNfts = async (
|
|
|
234
237
|
kioskTx: globalKioskTx,
|
|
235
238
|
shouldConvertToPersonalKiosk: true,
|
|
236
239
|
shouldAllowNftUnsharedKiosk: true,
|
|
240
|
+
shouldSkipFinalize: true,
|
|
237
241
|
async runCommands(kioskTx) {
|
|
238
242
|
existingKioskTx = kioskTx;
|
|
239
243
|
await addClaimTransferredNftTx({ ...txData, kioskTx });
|
|
@@ -250,6 +254,7 @@ export const claimNfts = async (
|
|
|
250
254
|
kioskTx: globalKioskTx,
|
|
251
255
|
shouldConvertToPersonalKiosk: true,
|
|
252
256
|
shouldAllowNftUnsharedKiosk: true,
|
|
257
|
+
shouldSkipFinalize: true,
|
|
253
258
|
async runCommands(kioskTx) {
|
|
254
259
|
existingKioskTx = kioskTx;
|
|
255
260
|
await addClaimTransferredNftWithPurchaseCapTx({ ...txData, kioskTx });
|
package/src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts
CHANGED
|
@@ -191,6 +191,7 @@ export async function migrateNftsFromUnsharedToSharedKiosks(
|
|
|
191
191
|
kiosk: unsharedNativeKiosk,
|
|
192
192
|
kioskStrategy: 'exclude',
|
|
193
193
|
kioskTx: globalKioskTx,
|
|
194
|
+
shouldSkipFinalize: true,
|
|
194
195
|
shouldConvertToPersonalKiosk: true,
|
|
195
196
|
async runCommands(kioskTx) {
|
|
196
197
|
existingKioskTx = kioskTx;
|