@temple-digital-group/temple-canton-js 2.1.0 → 2.1.1

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.
@@ -218,7 +218,12 @@ export function createConsoleWalletAdapter(consoleWallet, options = {}) {
218
218
  const useWait = typeof wallet.prepareExecuteAndWait === "function" &&
219
219
  (options.waitForExecution !== false || typeof wallet.prepareExecute !== "function");
220
220
  try {
221
- return await (useWait ? wallet.prepareExecuteAndWait(prepareRequest) : wallet.prepareExecute(prepareRequest));
221
+ const result = await (useWait ? wallet.prepareExecuteAndWait(prepareRequest) : wallet.prepareExecute(prepareRequest));
222
+ // The Console wallet resolves (does not throw) on a successful submit
223
+ // but often returns nothing — it only rejects on failure/user
224
+ // rejection. Normalize a void success into a truthy result so callers
225
+ // don't misread "no return value" as a failure.
226
+ return result ?? { success: true };
222
227
  }
223
228
  catch (error) {
224
229
  throw wrapConsoleSubmitError(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temple-digital-group/temple-canton-js",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "JavaScript library for interacting with Temple Canton blockchain",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -268,7 +268,12 @@ export function createConsoleWalletAdapter(consoleWallet: unknown, options: Cons
268
268
  typeof wallet.prepareExecuteAndWait === "function" &&
269
269
  (options.waitForExecution !== false || typeof wallet.prepareExecute !== "function");
270
270
  try {
271
- return await (useWait ? wallet.prepareExecuteAndWait!(prepareRequest) : wallet.prepareExecute!(prepareRequest));
271
+ const result = await (useWait ? wallet.prepareExecuteAndWait!(prepareRequest) : wallet.prepareExecute!(prepareRequest));
272
+ // The Console wallet resolves (does not throw) on a successful submit
273
+ // but often returns nothing — it only rejects on failure/user
274
+ // rejection. Normalize a void success into a truthy result so callers
275
+ // don't misread "no return value" as a failure.
276
+ return result ?? { success: true };
272
277
  } catch (error) {
273
278
  throw wrapConsoleSubmitError(error);
274
279
  }