@tradeport/sui-trading-sdk 0.3.8 → 0.3.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tradeport/sui-trading-sdk",
3
3
  "license": "MIT",
4
- "version": "0.3.8",
4
+ "version": "0.3.9",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -110,7 +110,10 @@ export const kioskTxWrapper = async ({
110
110
  version: '',
111
111
  },
112
112
  });
113
- } else if (kiosks.length > 0) {
113
+ } else if (shouldConvertToPersonalKiosk || kiosks.length === 0) {
114
+ kioskTx = new KioskTransaction({ transactionBlock: tx as any, kioskClient });
115
+ kioskTx.createPersonal(true);
116
+ } else {
114
117
  const kioskCapId = (
115
118
  await gqlChainRequest({
116
119
  chain: 'sui',
@@ -130,10 +133,6 @@ export const kioskTxWrapper = async ({
130
133
  version: '',
131
134
  },
132
135
  });
133
- } else {
134
- // creating new personal kiosk
135
- kioskTx = new KioskTransaction({ transactionBlock: tx as any, kioskClient });
136
- kioskTx.createPersonal(true);
137
136
  }
138
137
 
139
138
  await runCommands(kioskTx);